-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #22 from gdsc-kaist/feature/random-password
Feature/random password
- Loading branch information
Showing
13 changed files
with
341 additions
and
159 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,6 @@ paths: | |
- 계정 | ||
responses: | ||
'200': | ||
description: OK | ||
content: | ||
application/json: | ||
schema: | ||
|
@@ -16,7 +15,7 @@ paths: | |
'401': | ||
description: UnauthorizedError. 비밀번호가 일치하지 않습니다. | ||
post: | ||
description: 계정 생성. 기본 비밀번호는 'password'로 생성됨. | ||
description: 계정 생성 | ||
tags: | ||
- 계정 | ||
requestBody: | ||
|
@@ -37,7 +36,37 @@ paths: | |
responses: | ||
'200': | ||
description: OK | ||
content: | ||
application/json: | ||
schema: | ||
type: object | ||
properties: | ||
email: | ||
type: string | ||
description: 이메일 | ||
example: [email protected] | ||
password: | ||
type: string | ||
description: 비밀번호 | ||
example: abcdeABCDE!@ | ||
role: | ||
type: string | ||
description: 권한 | ||
example: user | ||
is_disabled: | ||
type: boolean | ||
description: 계정 비활성화 여부 | ||
example: false | ||
organization_id: | ||
type: integer | ||
description: 피감기관 id | ||
example: 1 | ||
required: | ||
- password | ||
- role | ||
- is_disabled | ||
- organization_id | ||
'400': | ||
description: BadRequestError. 비밀번호는 8자 이상 12자 이하여야 합니다. | ||
'409': | ||
|
@@ -153,6 +182,14 @@ definitions: | |
type: string | ||
description: 이메일 | ||
example: [email protected] | ||
organization_name: | ||
type: string | ||
description: 피감기관 이름 | ||
example: 감사원 | ||
password: | ||
type: string | ||
description: 비밀번호 (변경이 이루어졌다면 null, 처음 발급된 비밀번호라면 비밀번호가 노출됨) | ||
example: abcdeABCDE!@ | ||
role: | ||
type: string | ||
enum: ['user', 'admin'] | ||
|
@@ -162,17 +199,10 @@ definitions: | |
type: boolean | ||
description: 계정 비활성화 여부 | ||
example: false | ||
createdAt: | ||
type: timestamp | ||
description: 생성일자 | ||
example: 2020-01-01 00:00:00 | ||
updatedAt: | ||
type: timestamp | ||
description: 수정일자 | ||
example: 2020-01-01 00:00:00 | ||
required: | ||
- id | ||
- organization_name | ||
- password | ||
- role | ||
- isDisabled | ||
- createdAt | ||
- updatedAt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export * from './user'; | ||
export * from './organization'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
export const mockOrganization1 = { | ||
name: '학부총학생회', | ||
}; | ||
|
||
export const mockOrganization2 = { | ||
name: '감사원', | ||
}; | ||
|
||
export const mockOrganization3 = { | ||
name: '동아리연합회', | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
export const mockPassword = 'abcdefghjk!@'; | ||
|
||
export const mockEmail1 = '[email protected]'; | ||
export const mockEmail2 = '[email protected]'; | ||
export const mockEmail3 = '[email protected]'; | ||
|
||
export function createMockUser1(organizationId: number | string) { | ||
return { | ||
email: mockEmail1, | ||
password: mockPassword, | ||
initialPassword: mockPassword, | ||
OrganizationId: organizationId, | ||
}; | ||
} | ||
|
||
export function createMockUser2(organizationId: number | string) { | ||
return { | ||
email: mockEmail2, | ||
password: mockPassword, | ||
initialPassword: mockPassword, | ||
OrganizationId: organizationId, | ||
}; | ||
} | ||
|
||
export function createMockUser3(organizationId: number | string) { | ||
return { | ||
email: mockEmail3, | ||
password: mockPassword, | ||
initialPassword: mockPassword, | ||
OrganizationId: organizationId, | ||
}; | ||
} |
Oops, something went wrong.