mirror of
https://github.com/empayre/fleet.git
synced 2024-11-07 09:18:59 +00:00
7a68e3de65
- Support both /api/v1/fleet and /api/v1/kolide routes in server. - Add logging for use of deprecated routes. - Rename routes in frontend JS. - Rename routes and add notes in documentation.
26 lines
586 B
JavaScript
26 lines
586 B
JavaScript
import createRequestMock from 'test/mocks/create_request_mock';
|
|
import { userStub } from 'test/stubs';
|
|
|
|
export default {
|
|
create: {
|
|
valid: (bearerToken = 'abc123', params) => {
|
|
return createRequestMock({
|
|
endpoint: '/api/v1/fleet/login',
|
|
method: 'post',
|
|
params,
|
|
response: { token: bearerToken, user: userStub },
|
|
});
|
|
},
|
|
},
|
|
destroy: {
|
|
valid: (bearerToken) => {
|
|
return createRequestMock({
|
|
bearerToken,
|
|
endpoint: '/api/v1/fleet/logout',
|
|
method: 'post',
|
|
response: {},
|
|
});
|
|
},
|
|
},
|
|
};
|