This repository was archived by the owner on Jun 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -17,18 +17,18 @@ export default {
17
17
* run jobs, or perform some special logic.
18
18
*/
19
19
async bootstrap ( { strapi } ) {
20
- try {
21
- const count = await strapi . entityService . count ( "plugin::users-permissions.user" )
22
- if ( count === 0 ) {
20
+ try {
21
+ const count = await strapi . entityService . count ( "plugin::users-permissions.user" ) ;
22
+ if ( count === 0 ) {
23
23
createUserSeed ( strapi , 10 ) ;
24
24
console . log ( "SUCCESS: Created user on bootstrap" ) ;
25
25
}
26
- else {
26
+ else {
27
27
console . log ( "INFO: User have already been created on bootstrap" ) ;
28
28
}
29
29
}
30
- catch ( err ) {
31
- console . log ( "ERROR: Could not create user on bootstrap" )
30
+ catch ( err ) {
31
+ console . log ( "ERROR: Could not create user on bootstrap" ) ;
32
32
console . log ( err . details ) ;
33
33
}
34
34
}
Original file line number Diff line number Diff line change 1
1
export async function createUserSeed ( strapi , amountOfUsers : number ) {
2
2
console . log ( "Function called" )
3
3
4
- for ( let i = 0 ; i < amountOfUsers ; i ++ ) {
4
+ for ( let i = 0 ; i < amountOfUsers ; i ++ ) {
5
5
const user = {
6
6
username : `dummyUser${ i } ` ,
7
7
email : `dummyUser${ i } @example.com` ,
You can’t perform that action at this time.
0 commit comments