fix: wiki sortBy, wiki detail page endpoint, blog SSR URL, and upload volume
Deploy Canina / deploy (push) Successful in 1m34s
Deploy Canina / deploy (push) Successful in 1m34s
This commit is contained in:
1 parent
10849233de
commit
f71b22a664
3 files changed
+23
-34
No files matched your search
@@ -7,7 +7,9 @@ export class WikiService {
|
||||
constructor(private prisma: PrismaService) {}
|
||||
|
||||
async findAll(filters: PaginationDto) {
|
||||
const { search, page = 1, limit = 10, sortBy = 'term', sortOrder = 'asc' } = filters;
|
||||
const { search, page = 1, limit = 10, sortBy: rawSortBy = 'term', sortOrder = 'asc' } = filters;
|
||||
const allowedSortFields = ['key', 'term', 'wikiId'];
|
||||
const sortBy = allowedSortFields.includes(rawSortBy) ? rawSortBy : 'term';
|
||||
|
||||
const whereClause: any = {};
|
||||
if (search) {
|
||||
|
||||
Reference in new issue
Block a user