mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-08-10 10:22:29 +08:00
refactor(server): various type errors
This commit is contained in:
parent
6414dd71ab
commit
de83029c3a
@ -6,7 +6,7 @@ import etapiTokenService from "../services/etapi_tokens.js";
|
||||
import config from "../services/config.js";
|
||||
import type { NextFunction, Request, RequestHandler, Response, Router } from "express";
|
||||
import type { ValidatorMap } from "./etapi-interface.js";
|
||||
import type { ApiRequestHandler } from "../routes/routes.js";
|
||||
import type { ApiRequestHandler } from "../routes/route_api.js";
|
||||
const GENERIC_CODE = "GENERIC";
|
||||
|
||||
type HttpMethod = "all" | "get" | "post" | "put" | "delete" | "patch" | "options" | "head";
|
||||
|
@ -50,7 +50,7 @@ function init(app: Express.Application) {
|
||||
}
|
||||
};
|
||||
|
||||
return app._router.handle(req, res, () => {});
|
||||
return (app as any)._router.handle(req, res, () => {});
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -207,7 +207,7 @@ async function getClient(opts: ClientOpts): Promise<Client> {
|
||||
// it's not clear how to explicitly configure proxy (as opposed to system proxy),
|
||||
// so in that case, we always use node's modules
|
||||
if (isElectron && !opts.proxy) {
|
||||
return (await import("electron")).net as Client;
|
||||
return (await import("electron")).net as unknown as Client;
|
||||
} else {
|
||||
const { protocol } = url.parse(opts.url);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user