Skip to content

Commit

Permalink
use the write db for queries
Browse files Browse the repository at this point in the history
  • Loading branch information
0x7d8 committed Dec 5, 2024
1 parent b12b9f3 commit 2036bf3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/api/routes/global/__internal/sql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export = new globalAPIRouter.Path('/')
if (!key || key !== ctr["@"].env.INTERNAL_KEY) return ctr.status(ctr.$status.UNAUTHORIZED).print({ errors: ['Unauthorized'] })

const sql = await ctr.$body().text(),
result = await ctr["@"].database.$client.query(sql)
result = await ctr["@"].database.write.$client.query(sql)

return ctr.print(result.rows)
})
Expand Down

0 comments on commit 2036bf3

Please sign in to comment.