aboutsummaryrefslogtreecommitdiff
path: root/src/api/routes/admin/userPromote.js
diff options
context:
space:
mode:
authorPitu <[email protected]>2019-02-26 23:13:24 +0900
committerPitu <[email protected]>2019-02-26 23:13:24 +0900
commit7a74647d3e5b5681b9d5d3fa9b6e12d062232683 (patch)
tree318edbe05becccd8c8c77a4f4cf00913f50a5a66 /src/api/routes/admin/userPromote.js
parentAdd background to main page (diff)
downloadhost.fuwn.me-7a74647d3e5b5681b9d5d3fa9b6e12d062232683.tar.xz
host.fuwn.me-7a74647d3e5b5681b9d5d3fa9b6e12d062232683.zip
User management
Diffstat (limited to 'src/api/routes/admin/userPromote.js')
-rw-r--r--src/api/routes/admin/userPromote.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/api/routes/admin/userPromote.js b/src/api/routes/admin/userPromote.js
index caae176..4062dfa 100644
--- a/src/api/routes/admin/userPromote.js
+++ b/src/api/routes/admin/userPromote.js
@@ -2,13 +2,13 @@ const Route = require('../../structures/Route');
class userPromote extends Route {
constructor() {
- super('/admin/users/promote', 'get', { adminOnly: true });
+ super('/admin/users/promote', 'post', { adminOnly: true });
}
async run(req, res, db) {
if (!req.body) return res.status(400).json({ message: 'No body provided' });
const { id } = req.body;
- if (!id) return res.status(400).json({ message: 'No name provided' });
+ if (!id) return res.status(400).json({ message: 'No id provided' });
try {
await db.table('users')