note/actions.ts: Formatting fixes and lint exceptions

Signed-off-by: David Mehren <dmehren1@gmail.com>
This commit is contained in:
David Mehren 2020-04-13 15:46:07 +02:00
parent 5a1a25dda4
commit 73d4023155
No known key found for this signature in database
GPG key ID: 6017AF117F9756CB
2 changed files with 8 additions and 4 deletions

View file

@ -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()
@ -53,9 +55,11 @@ export function getRevision (req: any, res: Response, note: Note): void {
errors.errorInternalError(res)
return
}if (!content) {
}
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) {

View file

@ -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",