open-nomad/ui/mirage/factories/namespace.js
Michael Lange 61b988fbb8 Gracefully handle the 501 case
Enterprise endpoints return a 501 in the open source build. 5xx
errors throw by default, so handle this one since it's expected
for things such as namespaces.
2017-10-11 14:06:46 -07:00

13 lines
233 B
JavaScript

import { Factory, faker } from 'ember-cli-mirage';
export default Factory.extend({
id: i => (i === 0 ? 'default' : `namespace-${i}`),
name() {
return this.id;
},
hash: () => faker.random.uuid(),
description: '',
});