mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-23 10:16:32 -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 {
|
||||
const data = {
|
||||
// eslint-disable-next-line @typescript-eslint/camelcase
|
||||
client_id: config.github.clientID,
|
||||
// eslint-disable-next-line @typescript-eslint/camelcase
|
||||
redirect_uri: config.serverURL + '/auth/github/callback/' + Note.encodeNoteId(note.id) + '/gist',
|
||||
scope: 'gist',
|
||||
state: shortId.generate()
|
||||
|
@ -52,10 +54,12 @@ export function getRevision (req: any, res: Response, note: Note): void {
|
|||
logger.error(err)
|
||||
errors.errorInternalError(res)
|
||||
|
||||
return
|
||||
}if (!content) {
|
||||
return
|
||||
}
|
||||
if (!content) {
|
||||
errors.errorNotFound(res)
|
||||
return}
|
||||
return
|
||||
}
|
||||
res.set({
|
||||
'Access-Control-Allow-Origin': '*', // allow CORS as API
|
||||
'Access-Control-Allow-Headers': 'Range',
|
||||
|
@ -67,7 +71,6 @@ export function getRevision (req: any, res: Response, note: Note): void {
|
|||
})
|
||||
} else {
|
||||
errors.errorNotFound(res)
|
||||
return
|
||||
}
|
||||
} else {
|
||||
Revision.getNoteRevisions(note, function (err, data) {
|
||||
|
|
|
@ -219,6 +219,7 @@
|
|||
"script-loader": "^0.7.2",
|
||||
"string-loader": "^0.0.1",
|
||||
"style-loader": "^1.0.0",
|
||||
"ts-node": "^8.8.2",
|
||||
"typescript": "^3.7.2",
|
||||
"url-loader": "^2.3.0",
|
||||
"webpack": "^4.41.2",
|
||||
|
|
Loading…
Reference in a new issue