Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .air.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ tmp_dir = "tmp"
rerun = false
rerun_delay = 500
send_interrupt = false
stop_on_error = false
stop_on_error = true

[color]
app = ""
Expand Down
7 changes: 7 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
MYSQL_ROOT_PASSWORD=root
MYSQL_HOST=mysql
MYSQL_PORT=3306
MYSQL_DATABASE=taskdb
MYSQL_USER=appuser
MYSQL_PASSWORD=apppassword
JWT_SECRET=supersecretkey
49 changes: 32 additions & 17 deletions docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -434,24 +434,29 @@ const docTemplate = `{
],
"properties": {
"email": {
"type": "string"
"type": "string",
"example": "[email protected]"
},
"password": {
"type": "string"
"type": "string",
"example": "strongpassword123"
}
}
},
"dto.AuthResponse": {
"type": "object",
"properties": {
"email": {
"type": "string"
"type": "string",
"example": "[email protected]"
},
"id": {
"type": "integer"
"type": "integer",
"example": 1
},
"token": {
"type": "string"
"type": "string",
"example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}
}
},
Expand All @@ -476,22 +481,26 @@ const docTemplate = `{
],
"properties": {
"email": {
"type": "string"
"type": "string",
"example": "[email protected]"
},
"password": {
"type": "string",
"minLength": 6
"minLength": 6,
"example": "strongpassword123"
}
}
},
"dto.CreateUserResponse": {
"type": "object",
"properties": {
"email": {
"type": "string"
"type": "string",
"example": "[email protected]"
},
"id": {
"type": "integer"
"type": "integer",
"example": 1
}
}
},
Expand All @@ -508,7 +517,8 @@ const docTemplate = `{
"type": "object",
"properties": {
"message": {
"type": "string"
"type": "string",
"example": "User deleted successfully"
}
}
},
Expand Down Expand Up @@ -549,22 +559,26 @@ const docTemplate = `{
],
"properties": {
"id": {
"type": "integer"
"type": "integer",
"example": 1
},
"new_password": {
"type": "string",
"minLength": 6
"minLength": 6,
"example": "newsecurepassword456"
},
"old_password": {
"type": "string"
"type": "string",
"example": "oldpassword123"
}
}
},
"dto.UpdatePasswordResponse": {
"type": "object",
"properties": {
"message": {
"type": "string"
"type": "string",
"example": "Password updated successfully"
}
}
},
Expand Down Expand Up @@ -606,9 +620,7 @@ const docTemplate = `{
"example": "2025-08-27 10:35:16.263"
},
"id": {
"type": "integer",
"minimum": 1,
"example": 1
"type": "integer"
},
"status": {
"type": "string",
Expand All @@ -617,6 +629,9 @@ const docTemplate = `{
"task": {
"type": "string",
"example": "Buy milk"
},
"user_id": {
"type": "integer"
}
}
}
Expand Down
49 changes: 32 additions & 17 deletions docs/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -428,24 +428,29 @@
],
"properties": {
"email": {
"type": "string"
"type": "string",
"example": "[email protected]"
},
"password": {
"type": "string"
"type": "string",
"example": "strongpassword123"
}
}
},
"dto.AuthResponse": {
"type": "object",
"properties": {
"email": {
"type": "string"
"type": "string",
"example": "[email protected]"
},
"id": {
"type": "integer"
"type": "integer",
"example": 1
},
"token": {
"type": "string"
"type": "string",
"example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}
}
},
Expand All @@ -470,22 +475,26 @@
],
"properties": {
"email": {
"type": "string"
"type": "string",
"example": "[email protected]"
},
"password": {
"type": "string",
"minLength": 6
"minLength": 6,
"example": "strongpassword123"
}
}
},
"dto.CreateUserResponse": {
"type": "object",
"properties": {
"email": {
"type": "string"
"type": "string",
"example": "[email protected]"
},
"id": {
"type": "integer"
"type": "integer",
"example": 1
}
}
},
Expand All @@ -502,7 +511,8 @@
"type": "object",
"properties": {
"message": {
"type": "string"
"type": "string",
"example": "User deleted successfully"
}
}
},
Expand Down Expand Up @@ -543,22 +553,26 @@
],
"properties": {
"id": {
"type": "integer"
"type": "integer",
"example": 1
},
"new_password": {
"type": "string",
"minLength": 6
"minLength": 6,
"example": "newsecurepassword456"
},
"old_password": {
"type": "string"
"type": "string",
"example": "oldpassword123"
}
}
},
"dto.UpdatePasswordResponse": {
"type": "object",
"properties": {
"message": {
"type": "string"
"type": "string",
"example": "Password updated successfully"
}
}
},
Expand Down Expand Up @@ -600,9 +614,7 @@
"example": "2025-08-27 10:35:16.263"
},
"id": {
"type": "integer",
"minimum": 1,
"example": 1
"type": "integer"
},
"status": {
"type": "string",
Expand All @@ -611,6 +623,9 @@
"task": {
"type": "string",
"example": "Buy milk"
},
"user_id": {
"type": "integer"
}
}
}
Expand Down
18 changes: 16 additions & 2 deletions docs/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ definitions:
dto.AuthRequest:
properties:
email:
example: [email protected]
type: string
password:
example: strongpassword123
type: string
required:
- email
Expand All @@ -18,10 +20,13 @@ definitions:
dto.AuthResponse:
properties:
email:
example: [email protected]
type: string
id:
example: 1
type: integer
token:
example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
type: string
type: object
dto.CreateTaskRequest:
Expand All @@ -36,8 +41,10 @@ definitions:
dto.CreateUserRequest:
properties:
email:
example: [email protected]
type: string
password:
example: strongpassword123
minLength: 6
type: string
required:
Expand All @@ -47,8 +54,10 @@ definitions:
dto.CreateUserResponse:
properties:
email:
example: [email protected]
type: string
id:
example: 1
type: integer
type: object
dto.DeleteTaskResponse:
Expand All @@ -60,6 +69,7 @@ definitions:
dto.DeleteUserResponse:
properties:
message:
example: User deleted successfully
type: string
type: object
dto.GetTaskResponse:
Expand All @@ -84,11 +94,14 @@ definitions:
dto.UpdatePasswordRequest:
properties:
id:
example: 1
type: integer
new_password:
example: newsecurepassword456
minLength: 6
type: string
old_password:
example: oldpassword123
type: string
required:
- id
Expand All @@ -98,6 +111,7 @@ definitions:
dto.UpdatePasswordResponse:
properties:
message:
example: Password updated successfully
type: string
type: object
dto.UpdateStatusRequest:
Expand All @@ -124,15 +138,15 @@ definitions:
example: "2025-08-27 10:35:16.263"
type: string
id:
example: 1
minimum: 1
type: integer
status:
example: pending
type: string
task:
example: Buy milk
type: string
user_id:
type: integer
required:
- status
- task
Expand Down
Loading