Skip to content

Commit

Permalink
Require editor.
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerrit91 committed Sep 20, 2024
1 parent 79cbc41 commit a4ee6b5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmd/metal-api/internal/service/size-service.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ func (r *sizeResource) webService() *restful.WebService {
DefaultReturns("Error", httperrors.HTTPErrorResponse{}))

ws.Route(ws.DELETE("/reservations/{id}").
To(admin(r.deleteSizeReservation)).
To(editor(r.deleteSizeReservation)).
Operation("deleteSizeReservation").
Doc("deletes an size reservation and returns the deleted entity").
Param(ws.PathParameter("id", "identifier of the size reservation").DataType("string")).
Expand All @@ -150,7 +150,7 @@ func (r *sizeResource) webService() *restful.WebService {
DefaultReturns("Error", httperrors.HTTPErrorResponse{}))

ws.Route(ws.PUT("/reservations").
To(admin(r.createSizeReservation)).
To(editor(r.createSizeReservation)).
Operation("createSizeReservation").
Doc("create a size reservation. if the given ID already exists a conflict is returned").
Metadata(restfulspec.KeyOpenAPITags, tags).
Expand All @@ -160,7 +160,7 @@ func (r *sizeResource) webService() *restful.WebService {
DefaultReturns("Error", httperrors.HTTPErrorResponse{}))

ws.Route(ws.POST("/reservations").
To(admin(r.updateSizeReservation)).
To(editor(r.updateSizeReservation)).
Operation("updateSizeReservation").
Doc("updates a size reservation. if the size reservation was changed since this one was read, a conflict is returned").
Metadata(restfulspec.KeyOpenAPITags, tags).
Expand Down

0 comments on commit a4ee6b5

Please sign in to comment.