File tree Expand file tree Collapse file tree 5 files changed +28
-4
lines changed
Expand file tree Collapse file tree 5 files changed +28
-4
lines changed Original file line number Diff line number Diff line change 3434 "body" : " Newsletter Issue #161" ,
3535 "sentAt" : " 2020-03-24T18:25:43.511Z" ,
3636 "archived" : false ,
37- "read" : false
37+ "read" : true
3838 }
3939 ]
4040}
Original file line number Diff line number Diff line change 88 "lint" : " vue-cli-service lint"
99 },
1010 "dependencies" : {
11+ "axios" : " ^0.19.2" ,
1112 "core-js" : " ^3.6.4" ,
1213 "date-fns" : " ^2.11.0" ,
1314 "marked" : " ^0.8.1" ,
Original file line number Diff line number Diff line change 88 import MailScreenArchived from ' @/components/MailScreenArchived.vue' ;
99 import MailScreenInbox from ' @/components/MailScreenInbox.vue' ;
1010 import { ref } from ' vue' ;
11+ import axios from ' axios' ;
1112
1213 export default {
1314 async setup (){
14- let response = await fetch (' http://localhost:3000/emails' );
15- let emails = await response .json ();
16- emails = ref (emails);
15+ let {data} = await axios .get (' http://localhost:3000/emails' );
16+ let emails = ref (data);
1717
1818 return {emails};
1919 },
Original file line number Diff line number Diff line change 3131 import MailView from ' @/components/MailView.vue' ;
3232 import ModalView from ' @/components/ModalView.vue' ;
3333 import { ref } from ' vue' ;
34+ import axios from ' axios' ;
3435
3536 export default {
3637 setup ({emails}){
4243
4344 if (email) {
4445 openedEmail .value .read = true ;
46+ axios .put (` http://localhost:3000/emails/${ openedEmail .value .id } ` , openedEmail .value )
4547 }
4648 }
4749
Original file line number Diff line number Diff line change @@ -1584,6 +1584,13 @@ aws4@^1.8.0:
15841584 resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.9.1.tgz#7e33d8f7d449b3f673cd72deb9abdc552dbe528e"
15851585 integrity sha512-wMHVg2EOHaMRxbzgFJ9gtjOOCrI80OHLG14rxi28XwOW8ux6IiEbRCGGGqCtdAIg4FQCbW20k9RsT4y3gJlFug==
15861586
1587+ axios@^0.19.2 :
1588+ version "0.19.2"
1589+ resolved "https://registry.yarnpkg.com/axios/-/axios-0.19.2.tgz#3ea36c5d8818d0d5f8a8a97a6d36b86cdc00cb27"
1590+ integrity sha512-fjgm5MvRHLhx+osE2xoekY70AhARk3a6hkN+3Io1jc00jtquGvxYlKlsFUhmUET0V5te6CcZI7lcv2Ym61mjHA==
1591+ dependencies :
1592+ follow-redirects "1.5.10"
1593+
15871594babel-loader@^8.0.6 :
15881595 version "8.0.6"
15891596 resolved "https://registry.yarnpkg.com/babel-loader/-/babel-loader-8.0.6.tgz#e33bdb6f362b03f4bb141a0c21ab87c501b70dfb"
26402647 dependencies :
26412648 ms "2.0.0"
26422649
2650+ debug@=3.1.0 :
2651+ version "3.1.0"
2652+ resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261"
2653+ integrity sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==
2654+ dependencies :
2655+ ms "2.0.0"
2656+
26432657debug@^3.0.0, debug@^3.1.1, debug@^3.2.5 :
26442658 version "3.2.6"
26452659 resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b"
@@ -3358,6 +3372,13 @@ flush-write-stream@^1.0.0:
33583372 inherits "^2.0.3"
33593373 readable-stream "^2.3.6"
33603374
3375+ 3376+ version "1.5.10"
3377+ resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.5.10.tgz#7b7a9f9aea2fdff36786a94ff643ed07f4ff5e2a"
3378+ integrity sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ==
3379+ dependencies :
3380+ debug "=3.1.0"
3381+
33613382follow-redirects@^1.0.0 :
33623383 version "1.10.0"
33633384 resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.10.0.tgz#01f5263aee921c6a54fb91667f08f4155ce169eb"
You can’t perform that action at this time.
0 commit comments