mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-13 19:32:45 +00:00
Shift unlock and removeReview functions to use PUT
This commit is contained in:
@@ -237,7 +237,7 @@ const LockLookup = createClass({
|
|||||||
clickFn(){
|
clickFn(){
|
||||||
this.setState({ searching: true, error: null });
|
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 }))
|
.then((res)=>this.setState({ result: res.body }))
|
||||||
.catch((err)=>this.setState({ error: err }))
|
.catch((err)=>this.setState({ error: err }))
|
||||||
.finally(()=>{
|
.finally(()=>{
|
||||||
|
|||||||
@@ -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 {
|
try {
|
||||||
const filter = {
|
const filter = {
|
||||||
shareId : req.params.id
|
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 {
|
try {
|
||||||
const filter = {
|
const filter = {
|
||||||
shareId : req.params.id,
|
shareId : req.params.id,
|
||||||
|
|||||||
Reference in New Issue
Block a user