Skip to content

Commit

Permalink
refactor: 사용자 이름 확보 위해 쿠키 꺼내올 때에 getCookie() 사용
Browse files Browse the repository at this point in the history
  • Loading branch information
potados99 committed Dec 8, 2021
1 parent d0fb379 commit 912d839
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/DrawerList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
import JWT from 'jsonwebtoken';
import EventBus from '@/event-bus';
import services from '../../services';
import {getCookie} from '@/utils/cookie';
export default {
name: 'Drawer',
Expand All @@ -75,7 +76,7 @@ export default {
methods: {
resolveUserName() {
const jwtInCookie = window.document.cookie.split('=')[1];
const jwtInCookie = getCookie('cafeteria-console-server-token');
const payload = JWT.decode(jwtInCookie);
console.log(`토큰을 풀어보니 ${JSON.stringify(payload)}이군요`);
Expand Down

0 comments on commit 912d839

Please sign in to comment.