Skip to content
This repository was archived by the owner on Jan 26, 2022. It is now read-only.

Commit 342e8b9

Browse files
committed
Add auth mock data
1 parent f644220 commit 342e8b9

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

mock/auth.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
const faker = require('faker');
2+
const Random = faker.random;
3+
4+
module.exports = function () {
5+
return {
6+
isAuthenticated: true,
7+
};
8+
}

mock/db.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1+
const auth = require('./auth');
12
const dashboard = require('./dashboard');
23

3-
module.exports = function() {
4+
module.exports = function () {
45
return {
6+
auth: auth(),
57
dashboard: dashboard(),
68
};
79
}

mock/routes.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"/api": "/$1",
2+
"/api/auth": "/auth",
33
"/api/dashboard/comments": "/dashboard"
44
}

0 commit comments

Comments
 (0)