mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-29 02:52:27 +08:00
chore(lint): fix no-unused-vars errors
This commit is contained in:
parent
c8e36942fc
commit
7feb38ffa1
@ -82,7 +82,7 @@ function updateImage(req: Request) {
|
||||
const { noteId } = req.params;
|
||||
const { file } = req;
|
||||
|
||||
const note = becca.getNoteOrThrow(noteId);
|
||||
const _note = becca.getNoteOrThrow(noteId);
|
||||
|
||||
if (!file) {
|
||||
return {
|
||||
|
@ -5,7 +5,6 @@ import protectedSessionService from "../../services/protected_session.js";
|
||||
import noteService from "../../services/notes.js";
|
||||
import becca from "../../becca/becca.js";
|
||||
import type { Request } from "express";
|
||||
import type { RevisionRow } from "../../becca/entities/rows.js";
|
||||
|
||||
interface RecentChangeRow {
|
||||
noteId: string;
|
||||
|
@ -30,7 +30,7 @@ function getRelationMap(req: Request) {
|
||||
return resp;
|
||||
}
|
||||
|
||||
const questionMarks = noteIds.map((noteId) => "?").join(",");
|
||||
const questionMarks = noteIds.map((_noteId) => "?").join(",");
|
||||
|
||||
const relationMapNote = becca.getNoteOrThrow(relationMapNoteId);
|
||||
|
||||
|
@ -1,7 +1,6 @@
|
||||
"use strict";
|
||||
|
||||
import beccaService from "../../becca/becca_service.js";
|
||||
import revisionService from "../../services/revisions.js";
|
||||
import utils from "../../services/utils.js";
|
||||
import sql from "../../services/sql.js";
|
||||
import cls from "../../services/cls.js";
|
||||
|
@ -8,7 +8,7 @@ import becca from "../../becca/becca.js";
|
||||
async function getSimilarNotes(req: Request) {
|
||||
const noteId = req.params.noteId;
|
||||
|
||||
const note = becca.getNoteOrThrow(noteId);
|
||||
const _note = becca.getNoteOrThrow(noteId);
|
||||
|
||||
return await similarityService.findSimilarNotes(noteId);
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
import type { Application, Router } from "express";
|
||||
import type { Application } from "express";
|
||||
import swaggerUi from "swagger-ui-express";
|
||||
import { readFile } from "fs/promises";
|
||||
import { fileURLToPath } from "url";
|
||||
|
@ -68,7 +68,7 @@ function handleRequest(req: Request, res: Response) {
|
||||
function register(router: Router) {
|
||||
// explicitly no CSRF middleware since it's meant to allow integration from external services
|
||||
|
||||
router.all("/custom/:path*", (req: Request, res: Response, next) => {
|
||||
router.all("/custom/:path*", (req: Request, res: Response, _next) => {
|
||||
cls.namespace.bindEmitter(req);
|
||||
cls.namespace.bindEmitter(res);
|
||||
|
||||
|
@ -22,7 +22,7 @@ function register(app: Application) {
|
||||
});
|
||||
|
||||
// error handler
|
||||
app.use((err: any, req: Request, res: Response, next: NextFunction) => {
|
||||
app.use((err: any, req: Request, res: Response, _next: NextFunction) => {
|
||||
if (err.status !== 404) {
|
||||
log.info(err);
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user