| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -80,7 +80,7 @@ export const admin = new AdminForth({ | |||
| 80 | 80 | options: { | |
| 81 | 81 | allowedActions: { | |
| 82 | 82 | edit: false, | |
| 83 | - delete: false, | ||
| 83 | + // delete: false, | ||
| 84 | 84 | } | |
| 85 | 85 | }, | |
| 86 | 86 | plugins: [ | |
@@ -552,18 +552,11 @@ if (import.meta.url === `file://${process.argv[1]}`) { | |||
| 552 | 552 | // serve after you added all api | |
| 553 | 553 | admin.express.serve(app) | |
| 554 | 554 | admin.discoverDatabases().then(async () => { | |
| 555 | - if (!await admin.resource('users').get([Filters.EQ('email', 'adminforth')])) { | ||
| 556 | - await admin.resource('users').create({ | ||
| 557 | - email: 'adminforth', | ||
| 558 | - password_hash: await AdminForth.Utils.generatePasswordHash('adminforth'), | ||
| 559 | - role: 'superadmin', | ||
| 560 | - }); | ||
| 561 | - } | ||
| 562 | 555 | if (!await admin.resource('users').get([Filters.EQ('email', DEMO_EMAIL)])) { | |
| 563 | 556 | await admin.resource('users').create({ | |
| 564 | 557 | email: DEMO_EMAIL, | |
| 565 | 558 | password_hash: await AdminForth.Utils.generatePasswordHash(DEMO_PASSWORD ), | |
| 566 | - role: 'superadmin', | ||
| 559 | + role: 'user', | ||
| 567 | 560 | }); | |
| 568 | 561 | } | |
| 569 | 562 | }); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments