mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
upgrade deps
This commit is contained in:
7 files changed
+17
-17
No files matched your search
@@ -1,5 +1,5 @@
|
||||
import { Dictionary } from 'lodash';
|
||||
import LRU from 'lru-cache';
|
||||
import { LRUCache } from 'lru-cache';
|
||||
import { Filter } from 'mongodb';
|
||||
import { DomainDoc } from '../interface';
|
||||
import * as bus from '../service/bus';
|
||||
@@ -11,7 +11,7 @@ import UserModel, { deleteUserCache } from './user';
|
||||
|
||||
const coll = db.collection('domain');
|
||||
const collUser = db.collection('domain.user');
|
||||
const cache = new LRU<string, DomainDoc>({ max: 1000, ttl: 300 * 1000 });
|
||||
const cache = new LRUCache<string, DomainDoc>({ max: 1000, ttl: 300 * 1000 });
|
||||
|
||||
interface DomainUserArg {
|
||||
_id: number,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { escapeRegExp, pick, uniq } from 'lodash';
|
||||
import LRU from 'lru-cache';
|
||||
import { LRUCache } from 'lru-cache';
|
||||
import { Collection, Filter, ObjectId } from 'mongodb';
|
||||
import { LoginError, UserAlreadyExistError, UserNotFoundError } from '../error';
|
||||
import {
|
||||
@@ -23,7 +23,7 @@ export const coll: Collection<Udoc> = db.collection('user');
|
||||
// Virtual user, only for display in contest.
|
||||
export const collV: Collection<VUdoc> = db.collection('vuser');
|
||||
export const collGroup: Collection<GDoc> = db.collection('user.group');
|
||||
const cache = new LRU<string, User>({ max: 10000, ttl: 300 * 1000 });
|
||||
const cache = new LRUCache<string, User>({ max: 10000, ttl: 300 * 1000 });
|
||||
|
||||
export function deleteUserCache(udoc: { _id: number, uname: string, mail: string } | string | true | undefined | null, receiver = false) {
|
||||
if (!udoc) return false;
|
||||
|
||||
Reference in new issue
Block a user