mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
workspace: upgrade to mantine@9 and cordis@4-rc
This commit is contained in:
23 files changed
+93
-90
No files matched your search
@@ -48,7 +48,7 @@ export default class OauthModel extends Service {
|
||||
this.coll = ctx.db.collection('oauth');
|
||||
}
|
||||
|
||||
async [Context.init]() {
|
||||
async [Service.init]() {
|
||||
await this.ctx.db.ensureIndexes(this.coll,
|
||||
{ key: { platform: 1, id: 1 }, name: 'platform_id', unique: true },
|
||||
{ key: { uid: 1, platform: 1 }, name: 'uid_platform' },
|
||||
|
||||
@@ -55,7 +55,7 @@ export class MongoService extends Service {
|
||||
return mongourl;
|
||||
}
|
||||
|
||||
async *[Context.init]() {
|
||||
async *[Service.init]() {
|
||||
const mongourl = await MongoService.getUrl();
|
||||
const url = mongoUri.parse(mongourl);
|
||||
this.client = await MongoClient.connect(mongourl);
|
||||
|
||||
@@ -44,7 +44,7 @@ export class SettingService extends Service {
|
||||
super(ctx, 'setting');
|
||||
}
|
||||
|
||||
async [Context.init]() {
|
||||
async [Service.init]() {
|
||||
const payload = await this.ctx.db.collection('system').find({}).toArray();
|
||||
this.initialValues = Object.fromEntries(payload.map((v) => [v._id, v.value]));
|
||||
return await this.loadConfig();
|
||||
|
||||
Reference in new issue
Block a user