mirror of
				https://github.com/whyour/qinglong.git
				synced 2025-10-31 17:06:07 +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[]) { | ||||
|     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(); | ||||
|           resolve(); | ||||
|       }); | ||||
|         }, | ||||
|       ); | ||||
|     }); | ||||
|   } | ||||
| 
 | ||||
|  | @ -287,12 +291,12 @@ export default class CookieService { | |||
|     }); | ||||
|   } | ||||
| 
 | ||||
|   public async disabled(ids: string) { | ||||
|   public async disabled(ids: string[]) { | ||||
|     return new Promise((resolve: any) => { | ||||
|       this.cronDb.update( | ||||
|         { _id: { $in: ids } }, | ||||
|         { $set: { status: CookieStatus.disabled } }, | ||||
|         {}, | ||||
|         { multi: true }, | ||||
|         async (err) => { | ||||
|           await this.set_cookies(); | ||||
|           resolve(); | ||||
|  | @ -301,12 +305,12 @@ export default class CookieService { | |||
|     }); | ||||
|   } | ||||
| 
 | ||||
|   public async enabled(ids: string) { | ||||
|   public async enabled(ids: string[]) { | ||||
|     return new Promise((resolve: any) => { | ||||
|       this.cronDb.update( | ||||
|         { _id: { $in: ids } }, | ||||
|         { $set: { status: CookieStatus.noacquired } }, | ||||
|         {}, | ||||
|         { multi: true }, | ||||
|         async (err, num) => { | ||||
|           await this.set_cookies(); | ||||
|           resolve(); | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 hanhh
						hanhh