repair: get detail sparepart
This commit is contained in:
@@ -13,12 +13,14 @@ class SparepartController {
|
||||
const response = await setResponsePaging(queryParams, results, 'Sparepart found');
|
||||
res.status(response.statusCode).json(response);
|
||||
}
|
||||
|
||||
static async getById(req, res) {
|
||||
const { id } = req.params;
|
||||
const results = await SparepartService.getSparepartById(id);
|
||||
const response = await setResponse(results, 'Sparepart found');
|
||||
res.status(response.statusCode).json(response);
|
||||
}
|
||||
|
||||
static async create(req, res) {
|
||||
const { error, value } = await checkValidate(insertSparepartSchema, req);
|
||||
if (error) {
|
||||
|
||||
Reference in New Issue
Block a user