feat: use postgres to fetch and store user info
This commit is contained in:
parent
3528ea7d34
commit
40e0b14f2a
9 changed files with 175 additions and 42 deletions
|
|
@ -116,9 +116,8 @@ type PostAuthSignInResponseObject interface {
|
|||
}
|
||||
|
||||
type PostAuthSignIn200JSONResponse struct {
|
||||
Error *string `json:"error"`
|
||||
UserId *string `json:"user_id"`
|
||||
UserName *string `json:"user_name"`
|
||||
UserId int64 `json:"user_id"`
|
||||
UserName string `json:"user_name"`
|
||||
}
|
||||
|
||||
func (response PostAuthSignIn200JSONResponse) VisitPostAuthSignInResponse(w http.ResponseWriter) error {
|
||||
|
|
@ -148,9 +147,7 @@ type PostAuthSignUpResponseObject interface {
|
|||
}
|
||||
|
||||
type PostAuthSignUp200JSONResponse struct {
|
||||
Error *string `json:"error"`
|
||||
Success *bool `json:"success,omitempty"`
|
||||
UserId *string `json:"user_id"`
|
||||
UserId int64 `json:"user_id"`
|
||||
}
|
||||
|
||||
func (response PostAuthSignUp200JSONResponse) VisitPostAuthSignUpResponse(w http.ResponseWriter) error {
|
||||
|
|
|
|||
|
|
@ -30,16 +30,13 @@ paths:
|
|||
content:
|
||||
application/json:
|
||||
schema:
|
||||
required:
|
||||
- user_id
|
||||
type: object
|
||||
properties:
|
||||
success:
|
||||
type: boolean
|
||||
error:
|
||||
type: string
|
||||
nullable: true
|
||||
user_id:
|
||||
type: string
|
||||
nullable: true
|
||||
type: integer
|
||||
format: int64
|
||||
|
||||
/auth/sign-in:
|
||||
post:
|
||||
|
|
@ -65,17 +62,16 @@ paths:
|
|||
content:
|
||||
application/json:
|
||||
schema:
|
||||
required:
|
||||
- user_id
|
||||
- user_name
|
||||
type: object
|
||||
properties:
|
||||
error:
|
||||
type: string
|
||||
nullable: true
|
||||
user_id:
|
||||
type: string
|
||||
nullable: true
|
||||
type: integer
|
||||
format: int64
|
||||
user_name:
|
||||
type: string
|
||||
nullable: true
|
||||
"401":
|
||||
description: Access denied due to invalid credentials
|
||||
content:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue