ADD: Server urls
ADD: SearchBelongings function REMOVE: API from docker compose (run it manually) ADD: Required packages REMOVE: Redundant import from TsApiFeatures
This commit is contained in:
@@ -1,6 +1,15 @@
|
||||
const catchAsync = require('../../globalErrorHandler/catchAsync')
|
||||
const belongingService = require('./belongingService')
|
||||
|
||||
exports.searchBelongings = catchAsync(async (req, res, next) => {
|
||||
const {facets, belongings, totalCount, pagesCount} = await belongingService.searchBelongings()
|
||||
|
||||
res.status(200).json({
|
||||
status: 'success',
|
||||
facets, belongings, totalCount, pagesCount
|
||||
})
|
||||
})
|
||||
|
||||
exports.indexAllBelongings = catchAsync(async (req, res, next) => {
|
||||
const { indexedCount } = await belongingService.indexAllBelongings()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user