mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
core: typo fix
This commit is contained in:
1 parent
c3190551dd
commit
77c4f6dd27
7 files changed
+17
-17
No files matched your search
@@ -36,10 +36,10 @@ export function getMany(keys: string[]): any[] {
|
||||
return keys.map((key) => cache[key]);
|
||||
}
|
||||
|
||||
export async function set<K extends keyof SystemKeys>(_id: K, value: SystemKeys[K], boardcast?: boolean): Promise<SystemKeys[K]>;
|
||||
export async function set<K>(_id: string, value: K, boardcast?: boolean): Promise<K>;
|
||||
export async function set(_id: string, value: any, boardcast = true) {
|
||||
if (boardcast) bus.boardcast('system/setting', { [_id]: value });
|
||||
export async function set<K extends keyof SystemKeys>(_id: K, value: SystemKeys[K], broadcast?: boolean): Promise<SystemKeys[K]>;
|
||||
export async function set<K>(_id: string, value: K, broadcast?: boolean): Promise<K>;
|
||||
export async function set(_id: string, value: any, broadcast = true) {
|
||||
if (broadcast) bus.broadcast('system/setting', { [_id]: value });
|
||||
const res = await coll.findOneAndUpdate(
|
||||
{ _id },
|
||||
{ $set: { value } },
|
||||
|
||||
Reference in new issue
Block a user