mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-12-04 04:32:53 -05:00
note/actions.ts: Formatting fixes and lint exceptions
Signed-off-by: David Mehren <dmehren1@gmail.com>
This commit is contained in:
parent
5a1a25dda4
commit
73d4023155
2 changed files with 8 additions and 4 deletions
|
@ -33,7 +33,9 @@ export function getInfo (req: any, res: Response, note: Note): void {
|
||||||
|
|
||||||
export function createGist (req: any, res: Response, note: Note): void {
|
export function createGist (req: any, res: Response, note: Note): void {
|
||||||
const data = {
|
const data = {
|
||||||
|
// eslint-disable-next-line @typescript-eslint/camelcase
|
||||||
client_id: config.github.clientID,
|
client_id: config.github.clientID,
|
||||||
|
// eslint-disable-next-line @typescript-eslint/camelcase
|
||||||
redirect_uri: config.serverURL + '/auth/github/callback/' + Note.encodeNoteId(note.id) + '/gist',
|
redirect_uri: config.serverURL + '/auth/github/callback/' + Note.encodeNoteId(note.id) + '/gist',
|
||||||
scope: 'gist',
|
scope: 'gist',
|
||||||
state: shortId.generate()
|
state: shortId.generate()
|
||||||
|
@ -53,9 +55,11 @@ export function getRevision (req: any, res: Response, note: Note): void {
|
||||||
errors.errorInternalError(res)
|
errors.errorInternalError(res)
|
||||||
|
|
||||||
return
|
return
|
||||||
}if (!content) {
|
}
|
||||||
|
if (!content) {
|
||||||
errors.errorNotFound(res)
|
errors.errorNotFound(res)
|
||||||
return}
|
return
|
||||||
|
}
|
||||||
res.set({
|
res.set({
|
||||||
'Access-Control-Allow-Origin': '*', // allow CORS as API
|
'Access-Control-Allow-Origin': '*', // allow CORS as API
|
||||||
'Access-Control-Allow-Headers': 'Range',
|
'Access-Control-Allow-Headers': 'Range',
|
||||||
|
@ -67,7 +71,6 @@ export function getRevision (req: any, res: Response, note: Note): void {
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
errors.errorNotFound(res)
|
errors.errorNotFound(res)
|
||||||
return
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Revision.getNoteRevisions(note, function (err, data) {
|
Revision.getNoteRevisions(note, function (err, data) {
|
||||||
|
|
|
@ -219,6 +219,7 @@
|
||||||
"script-loader": "^0.7.2",
|
"script-loader": "^0.7.2",
|
||||||
"string-loader": "^0.0.1",
|
"string-loader": "^0.0.1",
|
||||||
"style-loader": "^1.0.0",
|
"style-loader": "^1.0.0",
|
||||||
|
"ts-node": "^8.8.2",
|
||||||
"typescript": "^3.7.2",
|
"typescript": "^3.7.2",
|
||||||
"url-loader": "^2.3.0",
|
"url-loader": "^2.3.0",
|
||||||
"webpack": "^4.41.2",
|
"webpack": "^4.41.2",
|
||||||
|
|
Loading…
Reference in a new issue