Update Configuration and Enhance Tender Approval Pagination

- Changed the server port from 8081 to 8082 for the web application.
- Updated MongoDB URI to include authentication credentials for improved security.
- Added new query parameters `limit` and `offset` for pagination in tender approval retrieval, enhancing the API's flexibility.
- Modified the response structure to include metadata for pagination, improving the clarity of responses.
- Updated API documentation to reflect the new pagination parameters and response format, ensuring consistency for API consumers.
This commit is contained in:
n.nakhostin
2025-09-06 12:07:32 +03:30
parent 61a217cf09
commit eb69a842f0
10 changed files with 171 additions and 52 deletions
+33 -5
View File
@@ -6006,6 +6006,23 @@ const docTemplate = `{
],
"summary": "Get tender approvals by company ID",
"parameters": [
{
"maximum": 100,
"minimum": 1,
"type": "integer",
"default": 20,
"description": "Number of approvals per page (1-100)",
"name": "limit",
"in": "query"
},
{
"minimum": 0,
"type": "integer",
"default": 0,
"description": "Number of approvals to skip for pagination",
"name": "offset",
"in": "query"
},
{
"enum": [
"self-apply",
@@ -6051,10 +6068,7 @@ const docTemplate = `{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/definitions/tender_approval.TenderApprovalWithTenderResponse"
}
"$ref": "#/definitions/tender_approval.TenderApprovalWithTenderListResponse"
}
}
}
@@ -8171,6 +8185,20 @@ const docTemplate = `{
}
}
},
"tender_approval.TenderApprovalWithTenderListResponse": {
"type": "object",
"properties": {
"metadata": {
"$ref": "#/definitions/response.Meta"
},
"tenders": {
"type": "array",
"items": {
"$ref": "#/definitions/tender_approval.TenderApprovalWithTenderResponse"
}
}
}
},
"tender_approval.TenderApprovalWithTenderResponse": {
"type": "object",
"properties": {
@@ -8585,7 +8613,7 @@ const docTemplate = `{
// SwaggerInfo holds exported Swagger Info so clients can modify it
var SwaggerInfo = &swag.Spec{
Version: "2.0.0",
Host: "localhost:8081",
Host: "localhost:8082",
BasePath: "/",
Schemes: []string{},
Title: "Tender Management API",