Skip to content

Commit 034297a

Browse files
fix: removed the if exists
1 parent 3b87b45 commit 034297a

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

app/src/store/sqliteGitPlatformDaoImpl.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,14 +65,13 @@ export class SqliteGitPlatformDaoImpl implements GitPlatformDao {
6565
}
6666

6767
async updateGitPlatform(ownerEmail: string, name: string, gitPlatformEntity: GitPlatformEntity): Promise<boolean> {
68+
console.log('updateGitPlatform', ownerEmail, name, gitPlatformEntity);
6869
const query = `UPDATE git_platforms
69-
SET url = ?,
70-
user_name = ?,
71-
personal_access_token = ?,
70+
SET personal_access_token = ?,
7271
updated_at = ?
7372
WHERE owner_email = ?
74-
and name = ? IF EXISTS`;
75-
const params = [gitPlatformEntity.url, gitPlatformEntity.user_name, gitPlatformEntity.personal_access_token, gitPlatformEntity.updated_at, ownerEmail, name];
73+
and name = ?`;
74+
const params = [gitPlatformEntity.personal_access_token, gitPlatformEntity.updated_at, ownerEmail, name];
7675
return new Promise<boolean>((resolve, reject) => {
7776
const stmt = db.prepare(query);
7877
stmt.run(params, (err: any) => {

0 commit comments

Comments
 (0)