Docker 파일
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import { getDb } from '../../../../utils/db'
|
||||
import { execute } from '../../../../utils/db'
|
||||
|
||||
export default defineEventHandler(async (event) => {
|
||||
const db = getDb()
|
||||
const id = getRouterParam(event, 'id')
|
||||
const body = await readBody(event)
|
||||
|
||||
@@ -14,11 +13,11 @@ export default defineEventHandler(async (event) => {
|
||||
})
|
||||
}
|
||||
|
||||
db.prepare(`
|
||||
await execute(`
|
||||
UPDATE privnet_targets
|
||||
SET name = ?, url = ?, is_active = ?, updated_at = datetime('now', 'localtime')
|
||||
WHERE id = ?
|
||||
`).run(name, url, is_active ? 1 : 0, id)
|
||||
SET name = $1, url = $2, is_active = $3, updated_at = TO_CHAR(NOW(), 'YYYY-MM-DD HH24:MI:SS')
|
||||
WHERE id = $4
|
||||
`, [name, url, is_active ? 1 : 0, id])
|
||||
|
||||
return {
|
||||
id: Number(id),
|
||||
|
||||
Reference in New Issue
Block a user