diff --git a/src/inc/routes/apiv2/tags.mjs b/src/inc/routes/apiv2/tags.mjs index f863b79..2b04680 100644 --- a/src/inc/routes/apiv2/tags.mjs +++ b/src/inc/routes/apiv2/tags.mjs @@ -105,11 +105,8 @@ export default router => { else { // update await db` - update "tags_assign" set ${ - db({ - tag_id: db`(array[2,1])[tag_id]` - }, tag_id) - } + update "tags_assign" + set tag_id = ${db`(array[2,1])[tag_id]`} where tag_id = any(array[1,2]) and item_id = ${+postid} `;