Skip to content

Commit

Permalink
add mock response
Browse files Browse the repository at this point in the history
Alex Kovalenko committed Feb 15, 2021

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 318ce29 commit ae6326b
Showing 3 changed files with 12 additions and 2 deletions.
3 changes: 2 additions & 1 deletion angular.json
Original file line number Diff line number Diff line change
@@ -28,7 +28,8 @@
"aot": true,
"assets": [
"src/favicon.ico",
"src/assets"
"src/assets",
"src/mock"
],
"styles": [
"src/styles.sass"
2 changes: 1 addition & 1 deletion src/environments/environment.ts
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@

export const environment = {
production: false,
api_url: 'https://api.thecatapi.com/v1/images/search',
api_url: '/mock/responses/thecatapi.com.response.json',
period: 2000,
};

9 changes: 9 additions & 0 deletions src/mock/responses/thecatapi.com.response.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[
{
"breeds": [],
"id": "ErmyshZhG",
"url": "https://cdn2.thecatapi.com/images/ErmyshZhG.jpg",
"width": 3024,
"height": 4032
}
]

0 comments on commit ae6326b

Please sign in to comment.