Skip to content

Commit

Permalink
회원가입 이전 방식으로 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
smoothbear committed Mar 3, 2022
1 parent 87805fd commit 976204c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 4 additions & 1 deletion Server/app/model/account/student.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ def get_student_by_id_email(id: str, email: str) -> 'StudentModel':
return student

@staticmethod
def signup(id, pw, name, number):
def signup(id, pw, unsigned_student: UnsignedStudentModel):
name = unsigned_student.name
number = unsigned_student.number

if StudentModel.get_student_by_id(id) is not None:
raise ResetContentException()

Expand Down
6 changes: 4 additions & 2 deletions Server/app/view/account/signup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,15 @@ class Signup(AccountResource):
@json_type_validate(SIGNUP_POST_JSON)
@swag_from(SIGNUP_POST)
def post(self):

uuid = request.json['uuid']
unsigned_student = UnsignedStudentModel.get_unsigned_student(uuid)

id = request.json['id']
pw = request.json['password']

unsigned_student = UnsignedStudentModel.get_unsigned_student(uuid)

StudentModel.signup(id, pw, unsigned_student.name, unsigned_student.number)
StudentModel.signup(id, pw, unsigned_student)
PointStatusModel(id).save()
StayApplyModel(id, 4).save()

Expand Down

0 comments on commit 976204c

Please sign in to comment.