-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rework mock api internal data storage
- Loading branch information
Showing
19 changed files
with
263 additions
and
180 deletions.
There are no files selected for viewing
10 changes: 10 additions & 0 deletions
10
src/frontend/tests/mockApi/categories/categories.data.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[ | ||
{ | ||
"id": 1, | ||
"name": "Bakery" | ||
}, | ||
{ | ||
"id": 2, | ||
"name": "Meat" | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,11 @@ | ||
import { db } from '../db'; | ||
import data from './categories.data.json'; | ||
|
||
export { handlers as categoriesHandlers } from './categories.handlers'; | ||
export * as categoriesService from './categories.service'; | ||
|
||
export const fillCategories = (): void => { | ||
data.forEach(category => { | ||
db.category.create(category); | ||
}); | ||
}; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,11 @@ | ||
import { db } from '../db'; | ||
import data from './notes.data.json'; | ||
|
||
export { handlers as notesHandlers } from './notes.handlers'; | ||
export * as notesService from './notes.service'; | ||
|
||
export const fillNotes = (): void => { | ||
data.forEach(note => { | ||
db.note.create(note); | ||
}); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
[ | ||
{ | ||
"id": 1, | ||
"mealType": 1, | ||
"displayOrder": 1, | ||
"quantity": 200, | ||
"productId": 1, | ||
"pageId": 1 | ||
}, | ||
{ | ||
"id": 2, | ||
"mealType": 1, | ||
"displayOrder": 0, | ||
"quantity": 150, | ||
"productId": 2, | ||
"pageId": 1 | ||
}, | ||
{ | ||
"id": 10, | ||
"mealType": 1, | ||
"displayOrder": 0, | ||
"quantity": 100, | ||
"productId": 1, | ||
"pageId": 2 | ||
}, | ||
{ | ||
"id": 20, | ||
"mealType": 1, | ||
"displayOrder": 0, | ||
"quantity": 100, | ||
"productId": 1, | ||
"pageId": 3 | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,11 @@ | ||
import { db } from '../db'; | ||
import data from './pages.data.json'; | ||
|
||
export { handlers as pagesHandlers } from './pages.handlers'; | ||
export * as pagesService from './pages.service'; | ||
|
||
export const fillPages = (): void => { | ||
data.forEach(page => { | ||
db.page.create(page); | ||
}); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
[ | ||
{ | ||
"id": 1, | ||
"date": "2022-01-01" | ||
}, | ||
{ | ||
"id": 2, | ||
"date": "2022-01-02" | ||
}, | ||
{ | ||
"id": 3, | ||
"date": "2022-01-03" | ||
} | ||
] |
Oops, something went wrong.