mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-14 04:12:43 +00:00
change api route to avoid collision
This commit is contained in:
@@ -158,7 +158,7 @@ const MetadataEditor = createClass({
|
|||||||
|
|
||||||
handleDeleteAuthor : function(author){
|
handleDeleteAuthor : function(author){
|
||||||
if(!confirm('Are you sure you want to delete this author? They will lose all edit access to this brew.')) return;
|
if(!confirm('Are you sure you want to delete this author? They will lose all edit access to this brew.')) return;
|
||||||
request.put(`/api/${this.props.metadata.editId}/${author}`)
|
request.put(`/api/prune/${this.props.metadata.editId}/${author}`)
|
||||||
.send()
|
.send()
|
||||||
.end((err, res)=>{
|
.end((err, res)=>{
|
||||||
if(err) {
|
if(err) {
|
||||||
|
|||||||
@@ -507,7 +507,7 @@ router.post('/api', checkClientVersion, asyncHandler(api.newBrew));
|
|||||||
router.put('/api/:id', checkClientVersion, asyncHandler(api.getBrew('edit', true)), asyncHandler(api.updateBrew));
|
router.put('/api/:id', checkClientVersion, asyncHandler(api.getBrew('edit', true)), asyncHandler(api.updateBrew));
|
||||||
router.put('/api/update/:id', checkClientVersion, asyncHandler(api.getBrew('edit', true)), asyncHandler(api.updateBrew));
|
router.put('/api/update/:id', checkClientVersion, asyncHandler(api.getBrew('edit', true)), asyncHandler(api.updateBrew));
|
||||||
router.delete('/api/:id', checkClientVersion, asyncHandler(api.deleteBrew));
|
router.delete('/api/:id', checkClientVersion, asyncHandler(api.deleteBrew));
|
||||||
router.put('/api/:id/:author', checkClientVersion, asyncHandler(api.deleteAuthor));
|
router.put('/api/prune/:id/:author', checkClientVersion, asyncHandler(api.deleteAuthor));
|
||||||
router.get('/api/remove/:id', checkClientVersion, asyncHandler(api.deleteBrew));
|
router.get('/api/remove/:id', checkClientVersion, asyncHandler(api.deleteBrew));
|
||||||
router.get('/api/theme/:renderer/:id', asyncHandler(api.getThemeBundle));
|
router.get('/api/theme/:renderer/:id', asyncHandler(api.getThemeBundle));
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user