<Express.js> edit profile form

김민석·2021년 1월 6일
0

이번 시간엔 edit-profile form을 만들어보겠습니다.

editProfile.pug

  • Method
    여기서는 method를 post로 했는데요. 바로 개인별 설정사항이기 때문에 비공개적으로 처리해야하기 때문입니다. get으로 처리하면 url에 정보가 추가되기 때문에 유의합시다.
  • Change Password
    비밀번호를 변경하는 것은 아이디 권한에 대해 더욱 중요한 사항이므로 한 단계 더 깊에 만들어 두었습니다.
.form__container
	form(action=`${routes.users}${routes.editProfile}`, method="post")
		label(for="avatar") Avatar
		input(type="file", id="avatar", name="avatar")
		input(type="text", placeholder="Name", name="name")
		input(type="email", Placeholder="Name", name="email")
		input(type="submit", value="Update profile")
	a.form-container__link(href=`${routes.users}${routes.changePasswrod}`) Change Password
		
profile
누구나 실수 할 수 있다고 생각합니다. 다만 저는 같은 실수를 반복하는 사람이 되고 싶지 않습니다. 같은 실수를 반복하지 않기 위해 기록하여 기억합니다.🙃

0개의 댓글