mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: support pathStyle setting
This commit is contained in:
1 parent
ed8ae6ba69
commit
57850fd53e
12 files changed
+58
-63
No files matched your search
@@ -92,13 +92,10 @@ class TokenModel {
|
||||
}
|
||||
}
|
||||
|
||||
function ensureIndexes() {
|
||||
return Promise.all([
|
||||
TokenModel.coll.createIndex({ uid: 1, tokenType: 1, updateAt: -1 }, { sparse: true }),
|
||||
TokenModel.coll.createIndex('expireAt', { expireAfterSeconds: 0 }),
|
||||
]);
|
||||
}
|
||||
|
||||
bus.once('app/started', ensureIndexes);
|
||||
bus.once('app/started', () => db.ensureIndexes(
|
||||
TokenModel.coll,
|
||||
{ key: { uid: 1, tokenType: 1, updateAt: -1 }, name: 'basic', sparse: true },
|
||||
{ key: { expireAt: -1 }, name: 'expire', expireAfterSeconds: 0 },
|
||||
));
|
||||
export default TokenModel;
|
||||
global.Hydro.model.token = TokenModel;
|
||||
Reference in new issue
Block a user