定时任务添加下次运行时间

This commit is contained in:
hanhh
2021-09-21 20:11:39 +08:00
parent 6619374571
commit 5b585e0cda
3 changed files with 54 additions and 12 deletions
+7 -1
View File
@@ -141,7 +141,13 @@ export default class OpenService {
});
}
public async authToken({ client_id, client_secret }): Promise<any> {
public async authToken({
client_id,
client_secret,
}: {
client_id: string;
client_secret: string;
}): Promise<any> {
const token = uuidV4();
const expiration = Math.round(Date.now() / 1000) + 2592000; // 2592000 30天
return new Promise((resolve) => {