You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
372 B
19 lines
372 B
import type { Request, Response } from 'express';
|
|
import { fakeList } from './utils';
|
|
|
|
function getFakeList(req: Request, res: Response) {
|
|
const params: any = req.query;
|
|
|
|
const count = params.count * 1 || 20;
|
|
|
|
const result = fakeList(count);
|
|
return res.json({
|
|
data: {
|
|
list: result,
|
|
},
|
|
});
|
|
}
|
|
|
|
export default {
|
|
'GET /api/fake_list': getFakeList,
|
|
};
|