mirror of
https://gitlab.com/mbugroup/lti-api.git
synced 2026-05-24 23:35:43 +00:00
feat[BE-222]: create migration create template for SO API and kandang id param on product warehouse
This commit is contained in:
@@ -29,7 +29,7 @@ func (u *SalesOrdersController) GetAll(c *fiber.Ctx) error {
|
||||
Search: c.Query("search", ""),
|
||||
}
|
||||
|
||||
if query.Page < 1 || query.Limit < 1 {
|
||||
if query.Page < 1 || query.Limit < 1 {
|
||||
return fiber.NewError(fiber.StatusBadRequest, "page and limit must be greater than 0")
|
||||
}
|
||||
|
||||
@@ -82,17 +82,17 @@ func (u *SalesOrdersController) CreateOne(c *fiber.Ctx) error {
|
||||
return fiber.NewError(fiber.StatusBadRequest, "Invalid request body")
|
||||
}
|
||||
|
||||
// result, err := u.SalesOrdersService.CreateOne(c, req)
|
||||
// if err != nil {
|
||||
// return err
|
||||
// }
|
||||
result, err := u.SalesOrdersService.CreateOne(c, req)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return c.Status(fiber.StatusCreated).
|
||||
JSON(response.Success{
|
||||
Code: fiber.StatusCreated,
|
||||
Status: "success",
|
||||
Message: "Create salesOrders successfully",
|
||||
Data: req,
|
||||
Data: result,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user