Skip to content

Commit d54ff65

Browse files
committed
fix(core): tidy and cleanups
1 parent 8255a40 commit d54ff65

File tree

5 files changed

+11
-11
lines changed

5 files changed

+11
-11
lines changed

.env.example

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ API_ENV=local
33
API_URL_GRPC=http://localhost
44
API_URL_GRPC_PORT=9090
55
API_URL_REST=http://localhost
6-
API_URL_REST_PORT=8000
6+
API_URL_REST_PORT=7090
77
API_VERSION=v0.2.0
88

99
DB_HOST=localhost

docs/openapi.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@
1212
},
1313
"servers": [
1414
{
15-
"url": "https://celeste-api.nuxify.tech/v1",
15+
"url": "http://localhost:8090/v1",
1616
"description": "Production"
1717
},
1818
{
19-
"url": "https://staging-celeste-api.nuxify.tech/v1",
19+
"url": "http://localhost:7090/v1",
2020
"description": "Staging"
2121
},
2222
{
23-
"url": "http://localhost:8000/v1",
23+
"url": "http://localhost:7090/v1",
2424
"description": "Local"
2525
}
2626
],
@@ -412,16 +412,16 @@
412412
"components": {
413413
"schemas": {
414414
"CreateUserRequest": {
415-
"required": ["email", "name", "password"],
415+
"required": ["email", "password", "name"],
416416
"type": "object",
417417
"properties": {
418418
"email": {
419419
"type": "string"
420420
},
421-
"name": {
421+
"password": {
422422
"type": "string"
423423
},
424-
"password": {
424+
"name": {
425425
"type": "string"
426426
}
427427
}

module/user/infrastructure/service/types/dto.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ package types
22

33
type CreateUser struct {
44
Email string
5-
Name string
65
Password string
6+
Name string
77
}
88

99
type CreateUserResult struct {

module/user/interfaces/http/dto.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ var (
88
Validate *validator.Validate = validator.New(validator.WithRequiredStructEnabled())
99
ValidationErrors map[string]string = map[string]string{
1010
"CreateUserRequest.Email": "Email field is required.",
11-
"CreateUserRequest.Name": "Name field is required.",
1211
"CreateUserRequest.Password": "Password field is required.",
12+
"CreateUserRequest.Name": "Name field is required.",
1313
"UpdateUserRequest.Name": "Name field is required.",
1414
"UpdateUserPasswordRequest.CurrentPassword": "Current password field is required.",
1515
"UpdateUserPasswordRequest.NewPassword": "New password field is required.",
@@ -18,8 +18,8 @@ var (
1818

1919
type CreateUserRequest struct {
2020
Email string `json:"email" validate:"required"`
21-
Name string `json:"name" validate:"required"`
2221
Password string `json:"password" validate:"required"`
22+
Name string `json:"name" validate:"required"`
2323
}
2424

2525
type UpdateUserRequest struct {

module/user/interfaces/http/rest/UserCommandController.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ func (controller *UserCommandController) CreateUser(w http.ResponseWriter, r *ht
6666

6767
res, err := controller.UserCommandServiceInterface.CreateUser(context.TODO(), serviceTypes.CreateUser{
6868
Email: request.Email,
69-
Name: request.Name,
7069
Password: request.Password,
70+
Name: request.Name,
7171
})
7272
if err != nil {
7373
var httpCode int

0 commit comments

Comments
 (0)