Add missing Metamigo changes
This commit is contained in:
parent
27810142b3
commit
161f3fcee2
6 changed files with 12 additions and 200 deletions
|
|
@ -5,7 +5,8 @@
|
|||
"author": "Abel Luck <abel@guardianproject.info>",
|
||||
"license": "AGPL-3.0-or-later",
|
||||
"dependencies": {
|
||||
"@digiresilience/montar": "*"
|
||||
"@digiresilience/montar": "*",
|
||||
"@digiresilience/metamigo-common": "*"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "7.20.12",
|
||||
|
|
|
|||
|
|
@ -41,13 +41,14 @@ export class WhatsappBotRecordRepository extends RepositoryBase(
|
|||
);
|
||||
}
|
||||
|
||||
async updateAuthInfo(
|
||||
async updateVerified(
|
||||
bot: SavedWhatsappBot,
|
||||
authInfo: string | undefined
|
||||
verified: boolean
|
||||
): Promise<SavedWhatsappBot> {
|
||||
return this.db.one(
|
||||
"UPDATE $1 SET (auth_info, is_verified) = ROW($2, true) WHERE id = $3 RETURNING *",
|
||||
[this.schemaTable, authInfo, bot.id]
|
||||
"UPDATE $1 SET (is_verified) = ROW($2) WHERE id = $3 RETURNING *",
|
||||
[this.schemaTable, verified, bot.id]
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue