2020-09-29 16:04:25 -07:00
|
|
|
import { Server, HandlerFunction } from 'ember-cli-mirage';
|
2020-08-26 15:44:50 -07:00
|
|
|
import { setup } from '@datahub/shared/mirage-addon/mirage-config';
|
2020-08-28 16:19:46 -07:00
|
|
|
import {
|
|
|
|
getInstitutionalMemory,
|
|
|
|
postInstitutionalMemory
|
|
|
|
} from '@datahub/shared/mirage-addon/helpers/institutional-memory';
|
2020-08-26 15:44:50 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Default handler for Mirage config
|
|
|
|
* @export
|
|
|
|
* @param {Server} this the Mirage server instance
|
|
|
|
*/
|
|
|
|
export default function(this: Server): void {
|
|
|
|
setup(this);
|
2020-08-28 10:31:15 -07:00
|
|
|
|
2020-08-28 16:19:46 -07:00
|
|
|
this.namespace = '';
|
|
|
|
this.get('/pokemons/:urn/institutionalmemory', (getInstitutionalMemory as unknown) as HandlerFunction);
|
|
|
|
this.post('/pokemons/:urn/institutionalmemory', (postInstitutionalMemory as unknown) as HandlerFunction);
|
|
|
|
// TODO Mirage for follows: https://jira01.corp.linkedin.com:8443/browse/META-11926
|
|
|
|
this.get(
|
|
|
|
'/api/v2/pokemons/pikachu:urn/follows',
|
2020-10-13 11:40:01 -07:00
|
|
|
(): Com.Linkedin.Common.Follow => ({
|
2020-08-28 16:19:46 -07:00
|
|
|
followers: [
|
|
|
|
{ follower: { corpUser: 'aketchum' } },
|
|
|
|
{ follower: { corpUser: 'misty' } },
|
|
|
|
{ follower: { corpUser: 'brock' } }
|
|
|
|
]
|
|
|
|
})
|
|
|
|
);
|
2020-08-26 15:44:50 -07:00
|
|
|
}
|