mirror of
https://github.com/dreamhunter2333/cloudflare_temp_email.git
synced 2026-09-05 07:27:27 +08:00
feature: update address updated_at in multi api (#676)
This commit is contained in:
@@ -31,7 +31,7 @@ export async function updateAddressUpdatedAt(
|
|||||||
// update address updated_at
|
// update address updated_at
|
||||||
try {
|
try {
|
||||||
if (address) {
|
if (address) {
|
||||||
c.env.DB.prepare(
|
await c.env.DB.prepare(
|
||||||
`UPDATE address SET updated_at = datetime('now') where name = ?`
|
`UPDATE address SET updated_at = datetime('now') where name = ?`
|
||||||
).bind(address).run();
|
).bind(address).run();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ export default {
|
|||||||
}, c.env.JWT_SECRET, "HS256");
|
}, c.env.JWT_SECRET, "HS256");
|
||||||
// update address updated_at
|
// update address updated_at
|
||||||
try {
|
try {
|
||||||
c.env.DB.prepare(
|
await c.env.DB.prepare(
|
||||||
`UPDATE address SET updated_at = datetime('now') where id IN `
|
`UPDATE address SET updated_at = datetime('now') where id IN `
|
||||||
+ `(SELECT address_id FROM users_address WHERE user_id = ?)`
|
+ `(SELECT address_id FROM users_address WHERE user_id = ?)`
|
||||||
).bind(user.user_id).run();
|
).bind(user.user_id).run();
|
||||||
|
|||||||
Reference in New Issue
Block a user