ADD: TsApiFeatures
ADD: Typesense ADD: Index all belongings router, controller & service
This commit is contained in:
@@ -1,6 +1,16 @@
|
||||
const catchAsync = require('../../globalErrorHandler/catchAsync')
|
||||
const belongingService = require('./belongingService')
|
||||
|
||||
exports.indexAllBelongings = catchAsync(async (req, res, next) => {
|
||||
const { indexedCount } = await belongingService.indexAllBelongings()
|
||||
|
||||
res.status(200).json({
|
||||
status: 'success',
|
||||
indexedCount
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
exports.getAllBelongings = catchAsync(async (req, res, next) => {
|
||||
const belongings = await belongingService.getAllBelongings()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user