Skip to content

Commit 6cc9fc7

Browse files
committed
feat: extend API to include all user and current user in response
1 parent 928919e commit 6cc9fc7

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

adminforth/commands/createApp/templates/api.ts.hbs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@ export function initApi(app: Express, admin: IAdminForth) {
44
app.get(`${admin.config.baseUrl}/api/hello/`,
55

66
// you can use data API to work with your database https://adminforth.dev/docs/tutorial/Customization/dataApi/
7-
const allUsers = await admin.resource.list([]);
8-
9-
// you can use req.adminUser to get info about the logged-in admin user
7+
// req.adminUser to get info about the logged-in admin user
108
async (req: Request, res: Response) => {
119
const allUsers = await admin.resource("adminuser").list([]);
1210
res.json({

0 commit comments

Comments
 (0)