ed4ce42237
- uniform api usage for some models (account/user, networks/vlans/fabrics, etc) - graphidoc, playground, faker, and voyager support - schema in a template tag and documented - apollo-errors - apollo-server-hapi and schema using graphql-tools/makeExecutableSchema - replace express with Hapi - eslint support for graphql - updated dependencies
22 lines
575 B
JavaScript
22 lines
575 B
JavaScript
const { fetch } = require('./request');
|
|
|
|
module.exports.list = () => fetch('/:login/fabrics/default/vlans');
|
|
module.exports.get = ({ id }) => fetch(`/:login/fabrics/default/vlans/${id}`);
|
|
|
|
module.exports.create = ctx =>
|
|
fetch(`/:login/fabrics/default/vlans`, {
|
|
method: 'POST',
|
|
body: ctx
|
|
});
|
|
|
|
module.exports.update = ({ id, ...rest }) =>
|
|
fetch(`/:login/fabrics/default/vlans/${id}`, {
|
|
method: 'PUT',
|
|
body: Object.assign({ id }, rest)
|
|
});
|
|
|
|
module.exports.destroy = ({ id }) =>
|
|
fetch(`/:login/fabrics/default/vlans/${id}`, {
|
|
method: 'DELETE'
|
|
});
|