Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
R
reybex-educational-app
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
M. Esat Akpunar
reybex-educational-app
Commits
14e75ca2
Commit
14e75ca2
authored
Aug 29, 2022
by
esatakpunar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update db
parent
07f53083
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1849 additions
and
963 deletions
+1849
-963
db.json
server/db.json
+1836
-950
vendors.js
server/vendors.js
+13
-13
No files found.
server/db.json
View file @
14e75ca2
This source diff could not be displayed because it is too large. You can
view the blob
instead.
server/vendors.js
View file @
14e75ca2
const
{
faker
}
=
require
(
'@faker-js/faker'
);
const
{
faker
}
=
require
(
"@faker-js/faker"
);
const
generateVendors
=
function
(
itemCount
)
{
const
generateVendors
=
function
(
itemCount
)
{
const
vendors
=
[]
const
vendors
=
[]
;
for
(
let
index
=
1
;
index
<
itemCount
;
index
++
)
{
for
(
let
index
=
1
;
index
<
itemCount
;
index
++
)
{
custome
rs
.
push
(
newFakedVendor
());
vendo
rs
.
push
(
newFakedVendor
());
}
}
return
vendors
;
return
vendors
;
}
}
;
function
newFakedVendor
()
{
function
newFakedVendor
()
{
const
firstName
=
faker
.
name
.
firstName
();
const
firstName
=
faker
.
name
.
firstName
();
...
@@ -17,14 +17,14 @@ function newFakedVendor() {
...
@@ -17,14 +17,14 @@ function newFakedVendor() {
const
id
=
faker
.
datatype
.
uuid
();
const
id
=
faker
.
datatype
.
uuid
();
return
{
return
{
"id"
:
id
,
id
:
id
,
"firstName"
:
firstName
,
firstName
:
firstName
,
"lastName"
:
lastName
,
lastName
:
lastName
,
"email"
:
email
,
email
:
email
,
"country"
:
faker
.
address
.
country
(),
country
:
faker
.
address
.
country
(),
"city"
:
faker
.
address
.
cityName
(),
city
:
faker
.
address
.
cityName
(),
"image"
:
faker
.
image
.
avatar
(),
image
:
faker
.
image
.
avatar
(),
}
}
;
}
}
module
.
exports
=
generateVendors
module
.
exports
=
generateVendors
;
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment