2016-10-27 15:52:55 +00:00
|
|
|
import { InMemoryDbService } from "angular-in-memory-web-api";
|
2016-09-06 13:54:03 +00:00
|
|
|
|
2016-10-28 03:40:09 +00:00
|
|
|
export class InMemoryDuckService implements InMemoryDbService {
|
2016-09-06 13:54:03 +00:00
|
|
|
createDb() {
|
|
|
|
let ducks = [
|
2016-10-27 15:52:55 +00:00
|
|
|
{
|
|
|
|
id: 1,
|
|
|
|
name: "Fastfingers",
|
|
|
|
color: "#ee6aa7"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
id: 2,
|
|
|
|
name: "Lady Pickett",
|
|
|
|
color: "#8b8b00"
|
|
|
|
}
|
2016-09-06 13:54:03 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
return {ducks};
|
|
|
|
}
|
|
|
|
}
|
2016-10-28 03:40:09 +00:00
|
|
|
|
|
|
|
export class InMemoryUserService implements InMemoryDbService {
|
|
|
|
createDb() {
|
|
|
|
let users = [
|
|
|
|
{
|
|
|
|
id: 1,
|
|
|
|
username: 'epolger',
|
|
|
|
password: 'epolger'
|
|
|
|
}
|
|
|
|
];
|
|
|
|
|
|
|
|
return {users};
|
|
|
|
}
|
|
|
|
}
|