mirror of
https://github.com/TheBinaryNinja/tvapp2.git
synced 2026-06-12 13:05:41 -04:00
13 lines
394 B
JavaScript
13 lines
394 B
JavaScript
import { Router } from 'express';
|
|
import { Activity } from '../models/Activity.js';
|
|
export const activityRouter = Router();
|
|
activityRouter.get('/', async (_req, res, next) => {
|
|
try {
|
|
const docs = await Activity.find({}, { _id: 0, order: 0 }).sort({ order: 1 }).lean();
|
|
res.json(docs);
|
|
}
|
|
catch (err) {
|
|
next(err);
|
|
}
|
|
});
|
|
//# sourceMappingURL=activity.js.map
|