[TIL] 230629

EllaDev·2023년 6월 29일
0

Today I Learn

목록 보기
11/13

Vue

  • storeToRefs : <script setup> 환경에서 store의 state나 Action을 가져올때 반응형으로 가져올 수 있도록 해주는 pinia 메서드

[VueJS] Pinia Store 기본 사용법 (ft. storeToRefs)
Pinia 🍍


JS

Async Await 여러개 실행 이슈

/** 
	해당 로직은 async await를 then...catch를 사용해서 에러처리한 코드이다.
    각각의 단계에 따라서 다른 에라가 출력 되어야하는데 잘 되지 않아서 이슈가 발생했다.
**/
const onSignup = async () => {
  await signup(id, password)
    .then(async () => {
      await signIn(id, password)
        .then(async (response: any) => {
          await useUserInfo(response.data)
            .then(async () => {
              await accessToken(id, password)
                .then(() => onModify())
                .catch((error: any) => {
                  const errRespData: any = error.response.data;
                  console.log("Error : 접근키 오류 : ", errRespData)})
            .catch(() => {
                const errRespData: any = error.response.data;
                console.log("Error : 회원정보 저장 오류 : ", errRespData)})
            })
        .catch((error: any) => {
            const errRespData: any = error.response.data;
            console.log("Error : 로그인 오류 : ", errRespData)})
        })
    .catch((error: any) => {
        const errRespData: any = error.response.data;
        console.log("Error : 계정 생성 오류 : ", errRespData)})
    });
};
  • 위이슈에 대해서 async await와 then...catch를 여러개 함께쓰면 혹시 문제가 생기는지 예제를 만들어서 확인해봤다

Coding Test

Pagination 구현

JS로 Pagination 구현하기


Git

gitlab

  • gitlab permission deny
    /opt/gitlab/embedded/service/gitlab-shell/bin/gitlab-shell: 
    Unable to configure logging: 
    open /var/log/gitlab/gitlab-shell/gitlab-shell.log: 
    permission denied, Unix syslog delivery error
    ⇒ 딱히 방법없어서 ssh 접속 말고 그냥 url 접속으로 해결(git remote set-url로 기존 url 변경)
profile
Frontend Developer

0개의 댓글