-
Notifications
You must be signed in to change notification settings - Fork 0
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 #5 from Questspace-v2/user/1
Refactor user handlers' code
- Loading branch information
Showing
7 changed files
with
86 additions
and
39 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ALTER TABLE "user" DROP COLUMN first_name, DROP COLUMN last_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
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 |
---|---|---|
@@ -0,0 +1,56 @@ | ||
package storage | ||
|
||
import "time" | ||
|
||
type CreateUserRequest struct { | ||
Username string `json:"username"` | ||
Password string `json:"password,omitempty"` | ||
AvatarURL string `json:"avatar_url,omitempty"` | ||
} | ||
|
||
type GetUserRequest struct { | ||
Id string | ||
Username string | ||
} | ||
|
||
type UpdateUserRequest struct { | ||
Id string `json:"id"` | ||
Username string `json:"username"` | ||
Password string `json:"password,omitempty"` | ||
AvatarURL string `json:"avatar_url,omitempty"` | ||
} | ||
|
||
type CreateQuestRequest struct { | ||
Name string `json:"name"` | ||
Description string `json:"description,omitempty"` | ||
Access AccessType `json:"access"` | ||
CreatorName string `json:"creator_name"` | ||
Creator *User `json:"-"` | ||
RegistrationDeadline *time.Time `json:"registration_deadline"` | ||
StartTime *time.Time `json:"start_time"` | ||
FinishTime *time.Time `json:"finish_time"` | ||
MediaLink string `json:"media_link"` | ||
MaxTeamCap *int `json:"max_team_cap"` | ||
} | ||
|
||
type GetQuestRequest struct { | ||
Id string | ||
} | ||
|
||
type UpdateQuestRequest struct { | ||
Id string `json:"id"` | ||
Name string `json:"name"` | ||
Description string `json:"description,omitempty"` | ||
Access AccessType `json:"access"` | ||
CreatorName string `json:"creator_name"` | ||
Creator *User `json:"-"` | ||
RegistrationDeadline *time.Time `json:"registration_deadline"` | ||
StartTime *time.Time `json:"start_time"` | ||
FinishTime *time.Time `json:"finish_time"` | ||
MediaLink string `json:"media_link"` | ||
MaxTeamCap *int `json:"max_team_cap"` | ||
} | ||
|
||
type DeleteQuestRequest struct { | ||
Id string | ||
} |