mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-19 09:45:37 -04:00
Types and lint fixes in lib/web/note
Signed-off-by: David Mehren <dmehren1@gmail.com>
This commit is contained in:
parent
b01bb93813
commit
8b6d5a64f0
4 changed files with 21 additions and 21 deletions
|
@ -1,4 +1,4 @@
|
|||
import { Response } from 'express'
|
||||
import { Request, Response } from 'express'
|
||||
|
||||
import { Note, Revision } from '../../models'
|
||||
import { logger } from '../../logger'
|
||||
|
@ -8,7 +8,7 @@ import shortId from 'shortid'
|
|||
import moment from 'moment'
|
||||
import querystring from 'querystring'
|
||||
|
||||
export function getInfo (req: any, res: Response, note: Note): void {
|
||||
export function getInfo (req: Request, res: Response, note: Note): void {
|
||||
const body = note.content
|
||||
const extracted = Note.extractMeta(body)
|
||||
const markdown = extracted.markdown
|
||||
|
@ -31,7 +31,7 @@ export function getInfo (req: any, res: Response, note: Note): void {
|
|||
res.send(data)
|
||||
}
|
||||
|
||||
export function createGist (req: any, res: Response, note: Note): void {
|
||||
export function createGist (req: Request, res: Response, note: Note): void {
|
||||
const data = {
|
||||
// eslint-disable-next-line @typescript-eslint/camelcase
|
||||
client_id: config.github.clientID,
|
||||
|
@ -44,7 +44,7 @@ export function createGist (req: any, res: Response, note: Note): void {
|
|||
res.redirect('https://github.com/login/oauth/authorize?' + query)
|
||||
}
|
||||
|
||||
export function getRevision (req: any, res: Response, note: Note): void {
|
||||
export function getRevision (req: Request, res: Response, note: Note): void {
|
||||
const actionId = req.params.actionId
|
||||
if (actionId) {
|
||||
const time = moment(parseInt(actionId))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue