Filters
This commit is contained in:
@@ -450,6 +450,7 @@ const app = new Elysia()
|
||||
* GET /api/qsos
|
||||
* Get user's QSOs (requires authentication)
|
||||
* Supports pagination: ?page=1&limit=100
|
||||
* Supports filters: band, mode, confirmed, confirmationType (all, lotw, dcl, both, none), search
|
||||
*/
|
||||
.get('/api/qsos', async ({ user, query, set }) => {
|
||||
if (!user) {
|
||||
@@ -462,6 +463,10 @@ const app = new Elysia()
|
||||
if (query.band) filters.band = query.band;
|
||||
if (query.mode) filters.mode = query.mode;
|
||||
if (query.confirmed) filters.confirmed = query.confirmed === 'true';
|
||||
if (query.confirmationType && query.confirmationType !== 'all') {
|
||||
filters.confirmationType = query.confirmationType;
|
||||
}
|
||||
if (query.search) filters.search = query.search;
|
||||
|
||||
// Pagination options
|
||||
const options = {
|
||||
|
||||
Reference in New Issue
Block a user