api: fix delete source route
The delete source handler now removes the leading "/" from the parameters passed to it. Not removing the "/" caused sources to not be deleted from the store since they could not be found when their name contained a "/" as the first character.
This commit is contained in:
parent
a91b5640de
commit
3aab64575b
1 changed files with 2 additions and 1 deletions
|
|
@ -278,7 +278,8 @@ func (api *API) sourceDeleteHandler(writer http.ResponseWriter, request *http.Re
|
|||
return
|
||||
}
|
||||
|
||||
api.store.DeleteSource(name[0])
|
||||
// remove leading / from first name
|
||||
api.store.DeleteSource(name[0][1:])
|
||||
|
||||
statusResponseOK(writer)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue