mirror of
https://github.com/whyour/qinglong.git
synced 2025-05-23 23:06:06 +08:00
修复ck启用禁用
This commit is contained in:
parent
189184832e
commit
f70c16be52
|
@ -193,10 +193,14 @@ export default class CookieService {
|
||||||
|
|
||||||
public async remove(ids: string[]) {
|
public async remove(ids: string[]) {
|
||||||
return new Promise((resolve: any) => {
|
return new Promise((resolve: any) => {
|
||||||
this.cronDb.remove({ _id: { $in: ids } }, {}, async (err) => {
|
this.cronDb.remove(
|
||||||
|
{ _id: { $in: ids } },
|
||||||
|
{ multi: true },
|
||||||
|
async (err) => {
|
||||||
await this.set_cookies();
|
await this.set_cookies();
|
||||||
resolve();
|
resolve();
|
||||||
});
|
},
|
||||||
|
);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -287,12 +291,12 @@ export default class CookieService {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public async disabled(ids: string) {
|
public async disabled(ids: string[]) {
|
||||||
return new Promise((resolve: any) => {
|
return new Promise((resolve: any) => {
|
||||||
this.cronDb.update(
|
this.cronDb.update(
|
||||||
{ _id: { $in: ids } },
|
{ _id: { $in: ids } },
|
||||||
{ $set: { status: CookieStatus.disabled } },
|
{ $set: { status: CookieStatus.disabled } },
|
||||||
{},
|
{ multi: true },
|
||||||
async (err) => {
|
async (err) => {
|
||||||
await this.set_cookies();
|
await this.set_cookies();
|
||||||
resolve();
|
resolve();
|
||||||
|
@ -301,12 +305,12 @@ export default class CookieService {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public async enabled(ids: string) {
|
public async enabled(ids: string[]) {
|
||||||
return new Promise((resolve: any) => {
|
return new Promise((resolve: any) => {
|
||||||
this.cronDb.update(
|
this.cronDb.update(
|
||||||
{ _id: { $in: ids } },
|
{ _id: { $in: ids } },
|
||||||
{ $set: { status: CookieStatus.noacquired } },
|
{ $set: { status: CookieStatus.noacquired } },
|
||||||
{},
|
{ multi: true },
|
||||||
async (err, num) => {
|
async (err, num) => {
|
||||||
await this.set_cookies();
|
await this.set_cookies();
|
||||||
resolve();
|
resolve();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user