Skip to content

Commit b4cdfec

Browse files
committed
chore: change requestes resource in index.ts.hbs
1 parent a76338d commit b4cdfec

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import AdminForth from 'adminforth';
33
import usersResource from "./resources/adminuser.js";
44
import { fileURLToPath } from 'url';
55
import path from 'path';
6+
import { Filters } from 'adminforth';
67

78
const ADMIN_BASE_URL = '';
89

@@ -16,7 +17,7 @@ export const admin = new AdminForth({
1617
loginBackgroundImage: 'https://images.unsplash.com/photo-1534239697798-120952b76f2b?q=80&w=3389&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
1718
loginBackgroundPosition: '1/2',
1819
loginPromptHTML: async () => {
19-
const adminforthUserExists = await admin.resource("users").count(Filters.EQ('email', 'adminforth')) > 0;
20+
const adminforthUserExists = await admin.resource("adminuser").count(Filters.EQ('email', 'adminforth')) > 0;
2021
if (adminforthUserExists) {
2122
return "Please use <b>adminforth</b> as username and <b>adminforth</b> as password"
2223
}

0 commit comments

Comments
 (0)