-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Labels
Description
Feature 상위 작업 Ticket Number
CLAP-85
이슈 내용(Description)
axios를 기반으로 한 데이터 페칭 공용함수를 만듭니다.
상세 내용(Details)
- axios를 통한 api 요청을 모듈화 합니다.
- 서버주소를 .env에 저장하고 해당 환경변수 관련 내용은 노션에 업로드 하겠습니다.
체크리스트(Tasks)
No response
참조(References)
async login() { try { const response = await axios.post('/api/login', { username: this.username, password: this.password }) const token = response.data.accessToken Cookies.set('accessToken', token, { expires: 1, secure: true }) // 쿠키에 accessToken 저장 this.$router.push('/dashboard') // 로그인 후 대시보드로 이동 } catch (error) { console.error('로그인 실패:', error) } }