Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

Commit

Permalink
fix #4
Browse files Browse the repository at this point in the history
  • Loading branch information
adr1enbe4udou1n committed Nov 5, 2020
1 parent 0457d4d commit ed620e6
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions packages/cli/generator/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ module.exports = (api, options) => {
apiURL: options.apiURL,
data: options.dataProvider,
auth: options.authProvider,
register: options.auth.includes("register"),
reset: options.auth.includes("reset"),
profile: options.auth.includes("profile"),
register: (options.auth || []).includes("register"),
reset: (options.auth || []).includes("reset"),
profile: (options.auth || []).includes("profile"),
locales: options.locales,
users: options.users,
impersonation: options.impersonation,
Expand All @@ -53,27 +53,27 @@ module.exports = (api, options) => {
*/
api.render("./login", {
material: options.material,
register: options.auth.includes("register"),
reset: options.auth.includes("reset"),
register: (options.auth || []).includes("register"),
reset: (options.auth || []).includes("reset"),
remember: options.authProvider === "sanctum",
});
}

if (options.auth.includes("register")) {
if ((options.auth || []).includes("register")) {
/**
* Register page
*/
api.render("./register");
}

if (options.auth.includes("reset")) {
if ((options.auth || []).includes("reset")) {
/**
* Resets pages
*/
api.render("./reset");
}

if (options.auth.includes("profile")) {
if ((options.auth || []).includes("profile")) {
/**
* Profile page
*/
Expand Down

0 comments on commit ed620e6

Please sign in to comment.