Have got removing parameters working
This commit is contained in:
parent
599c72d465
commit
2d42a0ef90
5 changed files with 103 additions and 20 deletions
|
|
@ -91,3 +91,25 @@ func (ieh ImageEditHandlers) AddProcessor(c fiber.Ctx) error {
|
|||
PreviewURL: res.PreviewURL(),
|
||||
})
|
||||
}
|
||||
|
||||
func (ieh ImageEditHandlers) DeleteProcessor(c fiber.Ctx) error {
|
||||
sessionID := c.Params("sessionID")
|
||||
if sessionID == "" {
|
||||
return fiber.ErrBadRequest
|
||||
}
|
||||
|
||||
processorID := c.Params("processorID")
|
||||
if processorID == "" {
|
||||
return fiber.ErrBadRequest
|
||||
}
|
||||
|
||||
res, err := ieh.ImageEditService.DeleteProcessor(c.Context(), sessionID, processorID)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return c.Status(http.StatusOK).JSON(sessionResponse{
|
||||
Session: res,
|
||||
PreviewURL: res.PreviewURL(),
|
||||
})
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue