2017-08-18 03:42:40 -07:00
|
|
|
import { IFunctionRouteHandler, IMirageServer } from 'wherehows-web/typings/ember-cli-mirage';
|
|
|
|
import { ApiStatus } from 'wherehows-web/utils/api';
|
2017-08-15 23:16:38 -07:00
|
|
|
|
|
|
|
export default function(this: IMirageServer) {
|
2017-08-18 03:42:40 -07:00
|
|
|
this.passthrough('/config', '/authenticate');
|
2017-08-15 23:16:38 -07:00
|
|
|
|
2017-08-18 03:42:40 -07:00
|
|
|
this.namespace = '/api/v1';
|
|
|
|
|
|
|
|
this.get('/datasets/:id/compliance/suggestions', function(
|
|
|
|
this: IFunctionRouteHandler,
|
|
|
|
{ complianceSuggestions }: { complianceSuggestions: any }
|
|
|
|
) {
|
|
|
|
return {
|
|
|
|
status: ApiStatus.OK,
|
|
|
|
autoClassification: {
|
|
|
|
urn: '',
|
|
|
|
classificationResult: JSON.stringify(this.serialize(complianceSuggestions.all())),
|
|
|
|
lastModified: new Date().getTime()
|
|
|
|
}
|
|
|
|
};
|
|
|
|
});
|
2017-08-15 23:16:38 -07:00
|
|
|
|
|
|
|
this.passthrough();
|
|
|
|
}
|