Add Flags Assets and Update Configuration

- Introduced multiple SVG flag assets to the project, enhancing the visual representation of country flags.
- Updated the configuration file to include a new path for the flags assets, ensuring proper access and organization.
- Modified the main application to accommodate the new flags path, improving the overall asset management in the application.
This commit is contained in:
n.nakhostin
2025-09-09 14:48:02 +03:30
parent c06ea278c0
commit c873635f6f
281 changed files with 11567 additions and 23 deletions
+14 -5
View File
@@ -50,6 +50,9 @@ package main
// @tag.name Admin-Inquiries
// @tag.description Administrative inquiry management operations for web panel including CRUD operations, search, statistics, and comprehensive filtering with pagination
// @tag.name Admin-Flags
// @tag.description Administrative flag management operations for web panel including flag listing and retrieval
// @tag.name Authorization
// @tag.description Customer authentication and authorization operations for mobile application including login, logout, token refresh, and profile access
@@ -68,11 +71,15 @@ package main
// @tag.name Inquiries
// @tag.description Public inquiry management operations for mobile application including inquiry submission and inquiry listing
// @tag.name Flags
// @tag.description Public flag management operations for mobile application including flag retrieval and listing
import (
"context"
"fmt"
"net/http"
"time"
"tm/internal/assets"
"tm/internal/company"
"tm/internal/company_category"
"tm/internal/customer"
@@ -129,7 +136,7 @@ func main() {
tenderApprovalRepository := tender_approval.NewTenderApprovalRepository(mongoManager, logger)
inquiryRepository := inquiry.NewInquiryRepository(mongoManager, logger)
logger.Info("Repositories initialized successfully", map[string]interface{}{
"repositories": []string{"customer", "user", "company", "category", "tender", "feedback", "tender_approval"},
"repositories": []string{"customer", "user", "company", "category", "tender", "feedback", "tender_approval", "inquiry"},
})
// Initialize validation service
@@ -144,8 +151,9 @@ func main() {
feedbackService := feedback.NewFeedbackService(feedbackRepo, tenderService, logger)
tenderApprovalService := tender_approval.NewTenderApprovalService(tenderApprovalRepository, tenderService, logger)
inquiryService := inquiry.NewInquiryService(inquiryRepository, logger)
flagService := assets.NewFlagService(logger, conf.Assets.FlagsPath)
logger.Info("Services initialized successfully", map[string]interface{}{
"services": []string{"customer", "user", "company", "category", "tender", "feedback", "tender_approval"},
"services": []string{"customer", "user", "company", "category", "tender", "feedback", "tender_approval", "inquiry", "flag"},
})
// Initialize handlers with services
@@ -157,16 +165,17 @@ func main() {
feedbackHandler := feedback.NewFeedbackHandler(feedbackService, userHandler, customerHandler, logger)
tenderApprovalHandler := tender_approval.NewHandler(tenderApprovalService, logger)
inquiryHandler := inquiry.NewHandler(inquiryService, logger)
flagHandler := assets.NewHandler(flagService, logger)
logger.Info("Handlers initialized successfully", map[string]interface{}{
"handlers": []string{"customer", "user", "company", "category", "tender", "feedback", "tender_approval"},
"handlers": []string{"customer", "user", "company", "category", "tender", "feedback", "tender_approval", "inquiry", "flag"},
})
// Initialize HTTP server
e := bootstrap.InitHTTPServer(conf, logger)
// Register routes
router.RegisterAdminRoutes(e, userHandler, companyHandler, customerHandler, tenderHandler, feedbackHandler, tenderApprovalHandler, inquiryHandler, categoryHandler)
router.RegisterPublicRoutes(e, customerHandler, tenderHandler, feedbackHandler, tenderApprovalHandler, companyHandler, inquiryHandler, categoryHandler)
router.RegisterAdminRoutes(e, userHandler, companyHandler, customerHandler, tenderHandler, feedbackHandler, tenderApprovalHandler, inquiryHandler, categoryHandler, flagHandler)
router.RegisterPublicRoutes(e, customerHandler, tenderHandler, feedbackHandler, tenderApprovalHandler, companyHandler, inquiryHandler, categoryHandler, flagHandler)
// Start server
serverAddr := fmt.Sprintf("%s:%d", conf.Server.Host, conf.Server.Port)