ADD: TsApiFeatures

ADD: Typesense
ADD: Index all belongings router, controller & service
This commit is contained in:
2024-12-31 22:49:43 +03:30
parent a8f8095948
commit ef504f3775
5 changed files with 291 additions and 0 deletions
@@ -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()