4
2
Fork 0

fix: Fix cache SQL query

pull/73/head
Ambrose Chua 2019-07-27 17:25:13 +08:00
parent ca91b19b53
commit 4fb5b53748
Signed by: ambrose
GPG Key ID: B34FBE029276BA5D
1 changed files with 1 additions and 1 deletions

View File

@ -42,7 +42,7 @@ class CacheHttp {
return response.body;
} else {
await this.db.rawInsert(
"INSERT INTO cache (url, resource) VALUES (?, ?) ON CONFLICT(url) DO UPDATE SET resource = ?",
"INSERT OR REPLACE INTO cache (url, resource) VALUES (?, ?)",
[url, response.body, response.body]);
return response.body;
}