기능구현중

This commit is contained in:
2026-01-11 14:49:27 +09:00
parent 17852cc5dc
commit 8e0f1f30cf
3 changed files with 108 additions and 10 deletions

View File

@@ -0,0 +1,22 @@
import { execute } from '../../../utils/db'
import { requireAuth } from '../../../utils/session'
/**
* 구글 그룹 삭제 (비활성화)
* DELETE /api/google-group/[id]/delete
*/
export default defineEventHandler(async (event) => {
await requireAuth(event)
const groupId = parseInt(getRouterParam(event, 'id') || '0')
if (!groupId) {
throw createError({ statusCode: 400, message: '그룹 ID가 필요합니다.' })
}
await execute(`
UPDATE wr_google_group SET is_active = false, updated_at = NOW()
WHERE group_id = $1
`, [groupId])
return { success: true, message: '그룹이 삭제되었습니다.' }
})