core: fix startup

This commit is contained in:
undefined committed 2025-03-04 12:09:15 +08:00
1 parent d72bb2074d
commit f7e635c40c
2 files changed
+3 -3

No files matched your search

+2 -2
View File
@@ -1,5 +1,5 @@
import * as cordis from '@cordisjs/core';
import { Logger } from '@cordisjs/logger';
import LoggerService from '@cordisjs/logger';
import { TimerService } from '@cordisjs/plugin-timer';
import Schema from 'schemastery';
import type { DomainDoc, GeoIP, ModuleInterfaces } from './interface';
@@ -72,7 +72,7 @@ export class Context extends cordis.Context {
super();
this.plugin(ApiMixin);
this.plugin(TimerService);
this.plugin(Logger);
this.plugin(LoggerService);
}
}
+1 -1
View File
@@ -219,7 +219,7 @@ export async function apply(ctx: Context) {
? (!host.includes(this.request.host))
: this.request.host !== host)
)) withDomainId ||= domainId;
res = ctx.server.router.url.call(ctx.server.router, name, args, { query }).toString();
res = server.router.url.call(server.router, name, args, { query }).toString();
if (anchor) res = `${res}#${anchor}`;
if (withDomainId) res = `/d/${withDomainId}${res}`;
} catch (e) {