Skip to content

Commit

Permalink
minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Imomali1 committed Feb 8, 2023
1 parent e8aa568 commit c699442
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 4 deletions.
13 changes: 12 additions & 1 deletion internal/models/auth.go
Original file line number Diff line number Diff line change
@@ -1,19 +1,30 @@
package models

type RegisterRequest struct {
Id int `json:"-"`
Firstname string `json:"firstname"`
Lastname string `json:"lastname"`
Username string `json:"username"`
Email string `json:"email"`
Password string `json:"password"`
}

type RegisterResponse struct {
Message string `json:"message"`
}

type LoginRequest struct {
Email string `json:"email"`
Password string `json:"password"`
}

type LoginResponse struct {
Token string `json:"token"`
ExpiresAt int `json:"expires_at"`
}

type LogoutRequest struct {
}

type LogoutResponse struct {
}
}
3 changes: 3 additions & 0 deletions internal/models/list.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
package models

type CreateListRequest struct {
Id int `json:"id"`
Name string `json:"name"`
}

type CreateListResponse struct {

}

type GetListsRequest struct {
Expand Down
9 changes: 6 additions & 3 deletions internal/repository/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,16 @@ func NewAuthRepository(db *sql.DB) *AuthRepos {
}

func (r *AuthRepos) Register(req models.RegisterRequest) (models.RegisterResponse, error) {
return r.Register(req)
//TODO implement me
panic("implement me")
}

func (r *AuthRepos) Login(req models.LoginRequest) (models.LoginResponse, error) {
return r.Login(req)
//TODO implement me
panic("implement me")
}

func (r *AuthRepos) Logout(req models.LogoutRequest) (models.LogoutResponse, error) {
return r.Logout(req)
//TODO implement me
panic("implement me")
}

0 comments on commit c699442

Please sign in to comment.