Refactor species edit
This commit is contained in:
parent
d1e3d05db2
commit
4dbfb73b3c
8 changed files with 60 additions and 41 deletions
|
@ -8,16 +8,11 @@ export default function() {
|
|||
export function testConfig() {
|
||||
this.urlPrefix = 'https://bactdb-test.herokuapp.com';
|
||||
this.namespace = '/api/hymenobacter';
|
||||
this.timing = 0;
|
||||
|
||||
this.get('/users/:id', function(db, request) {
|
||||
return { 'user': db.users.find(request.params.id) };
|
||||
});
|
||||
this.get('/users/:id');
|
||||
|
||||
this.get('/species', function(db) {
|
||||
return { 'species': db.species };
|
||||
});
|
||||
|
||||
this.get('/species/:id', function(db, request) {
|
||||
return { 'species': db.species.find(request.params.id) };
|
||||
});
|
||||
this.get('/species');
|
||||
this.get('/species/:id');
|
||||
this.put('/species/:id');
|
||||
}
|
||||
|
|
|
@ -8,4 +8,5 @@ export default Mirage.Factory.extend({
|
|||
strains: [],
|
||||
totalStrains: 0,
|
||||
sortOrder: faker.random.number(),
|
||||
canEdit: faker.random.boolean(),
|
||||
});
|
||||
|
|
Reference in a new issue