mirror of
https://github.com/documize/community.git
synced 2025-08-08 15:05:28 +02:00
Start work to use factories in mirage instead of gard coded respenses
This commit is contained in:
parent
57a1e30df7
commit
11fd32cf83
4 changed files with 29 additions and 16 deletions
|
@ -16,6 +16,12 @@ export default function() {
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// this.get('/public/meta', function(db) {
|
||||||
|
// return {
|
||||||
|
// meta: db.meta;
|
||||||
|
// };
|
||||||
|
// });
|
||||||
|
|
||||||
this.get('/public/validate', function(db, request) {
|
this.get('/public/validate', function(db, request) {
|
||||||
let serverToken = request.queryParams.token;
|
let serverToken = request.queryParams.token;
|
||||||
let token = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkb21haW4iOiIiLCJleHAiOjE0NjQwMjM2NjcsImlzcyI6IkRvY3VtaXplIiwib3JnIjoiVnpNdXlFd18zV3FpYWZjRCIsInN1YiI6IndlYmFwcCIsInVzZXIiOiJWek11eUV3XzNXcWlhZmNFIn0.NXZ6bo8mtvdZF_b9HavbidVUJqhmBA1zr0fSAPvbah0";
|
let token = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkb21haW4iOiIiLCJleHAiOjE0NjQwMjM2NjcsImlzcyI6IkRvY3VtaXplIiwib3JnIjoiVnpNdXlFd18zV3FpYWZjRCIsInN1YiI6IndlYmFwcCIsInVzZXIiOiJWek11eUV3XzNXcWlhZmNFIn0.NXZ6bo8mtvdZF_b9HavbidVUJqhmBA1zr0fSAPvbah0";
|
||||||
|
@ -484,6 +490,14 @@ export default function() {
|
||||||
]};
|
]};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
this.post('/folders/VzMuyEw_3WqiafcG/invitation', () => {
|
||||||
|
return {};
|
||||||
|
});
|
||||||
|
|
||||||
|
this.put('/folders/VzMuyEw_3WqiafcG/permissions', () => {
|
||||||
|
return {};
|
||||||
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
very helpful for debugging
|
very helpful for debugging
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,15 +0,0 @@
|
||||||
/*
|
|
||||||
This is an example factory definition.
|
|
||||||
|
|
||||||
Create more files in this directory to define additional factories.
|
|
||||||
*/
|
|
||||||
import Mirage/*, {faker} */ from 'ember-cli-mirage';
|
|
||||||
|
|
||||||
export default Mirage.Factory.extend({
|
|
||||||
orgId: "VzMuyEw_3WqiafcD",
|
|
||||||
title: "EmberSherpa",
|
|
||||||
message: "This Documize instance contains all our team documentation",
|
|
||||||
url: "",
|
|
||||||
allowAnonymousAccess: false,
|
|
||||||
version: "11.2"
|
|
||||||
});
|
|
15
app/app/mirage/factories/meta.js
Normal file
15
app/app/mirage/factories/meta.js
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
/*
|
||||||
|
This is an example factory definition.
|
||||||
|
|
||||||
|
Create more files in this directory to define additional factories.
|
||||||
|
*/
|
||||||
|
import Mirage from 'ember-cli-mirage';
|
||||||
|
|
||||||
|
export default Mirage.Factory.extend({
|
||||||
|
orgId() { return "VzMuyEw_3WqiafcD"; },
|
||||||
|
title() { return "EmberSherpa"; },
|
||||||
|
message() { return "This Documize instance contains all our team documentation"; },
|
||||||
|
url() { return ""; },
|
||||||
|
allowAnonymousAccess() { return false; },
|
||||||
|
version() { return "11.2"; }
|
||||||
|
});
|
|
@ -4,5 +4,4 @@ export default function(/* server */) {
|
||||||
// data will not be loaded in your tests.
|
// data will not be loaded in your tests.
|
||||||
|
|
||||||
// server.createList('contact', 10);
|
// server.createList('contact', 10);
|
||||||
server.createList('app-meta', 1);
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue