修改表唯一约束

This commit is contained in:
whyour
2022-01-27 00:49:44 +08:00
parent a3a62f65dd
commit 891619ad55
7 changed files with 23 additions and 15 deletions
+2 -2
View File
@@ -24,8 +24,8 @@ export default class OpenService {
return { ...doc, tokens: [] };
}
public async insert(payloads: App): Promise<App> {
const doc = await AppModel.create(payloads, { returning: true });
public async insert(payload: App): Promise<App> {
const doc = await AppModel.create(payload, { returning: true });
return doc.get({ plain: true }) as App;
}