From 44f2e3838735868203129b142f93298c79cb3d17 Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Sat, 8 Jun 2024 20:00:10 +1200 Subject: [PATCH] Shift unlock and removeReview functions to use PUT --- client/admin/lockTools/lockTools.jsx | 2 +- server/admin.api.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/client/admin/lockTools/lockTools.jsx b/client/admin/lockTools/lockTools.jsx index 7f92cdd0e..710d08ff2 100644 --- a/client/admin/lockTools/lockTools.jsx +++ b/client/admin/lockTools/lockTools.jsx @@ -237,7 +237,7 @@ const LockLookup = createClass({ clickFn(){ this.setState({ searching: true, error: null }); - request.get(`${this.props.fetchURL}/${this.state.query}`) + request.put(`${this.props.fetchURL}/${this.state.query}`) .then((res)=>this.setState({ result: res.body })) .catch((err)=>this.setState({ error: err })) .finally(()=>{ diff --git a/server/admin.api.js b/server/admin.api.js index 8559143c2..d02cdb67b 100644 --- a/server/admin.api.js +++ b/server/admin.api.js @@ -186,7 +186,7 @@ router.post('/admin/lock/:id', mw.adminOnly, async (req, res)=>{ } }); -router.get('/admin/unlock/:id', mw.adminOnly, async (req, res)=>{ +router.put('/admin/unlock/:id', mw.adminOnly, async (req, res)=>{ try { const filter = { shareId : req.params.id @@ -260,7 +260,7 @@ router.put('/admin/lock/review/request/:id', async (req, res)=>{ } }); -router.get('/admin/lock/review/remove/:id', mw.adminOnly, async (req, res)=>{ +router.put('/admin/lock/review/remove/:id', mw.adminOnly, async (req, res)=>{ try { const filter = { shareId : req.params.id,