This commit is contained in:
2025-12-15 16:21:06 +01:00
parent 5d8441bf27
commit f1f95953dd
19 changed files with 429 additions and 144 deletions

View File

@@ -33,7 +33,6 @@ var __importStar = (this && this.__importStar) || (function () {
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.search = search;
exports.searchInExtension = searchInExtension;
exports.getInfo = getInfo;
exports.getFavorites = getFavorites;
@@ -41,24 +40,6 @@ exports.getFavoriteById = getFavoriteById;
exports.addFavorite = addFavorite;
exports.removeFavorite = removeFavorite;
const galleryService = __importStar(require("./gallery.service"));
async function search(req, reply) {
try {
const query = req.query.q || '';
const page = parseInt(req.query.page) || 1;
const perPage = parseInt(req.query.perPage) || 48;
return await galleryService.searchGallery(query, page, perPage);
}
catch (err) {
const error = err;
console.error("Gallery Search Error:", error.message);
return {
results: [],
total: 0,
page: 1,
hasNextPage: false
};
}
}
async function searchInExtension(req, reply) {
try {
const provider = req.query.provider;