Merge remote-tracking branch 'origin/master'
This commit is contained in:
50
svc/main.go
50
svc/main.go
@@ -805,6 +805,41 @@ func InitRoutes(pgDB *sql.DB, mssql *sql.DB, ml *mailer.GraphMailer) *mux.Router
|
||||
"pricing", "view",
|
||||
wrapV3(http.HandlerFunc(routes.ExportAllProductPricingHandler)),
|
||||
)
|
||||
bindV3(r, pgDB,
|
||||
"/api/pricing/products/price-list/export-excel", "POST",
|
||||
"pricing", "view",
|
||||
wrapV3(http.HandlerFunc(routes.ExportProductPriceListExcelHandler(pgDB))),
|
||||
)
|
||||
bindV3(r, pgDB,
|
||||
"/api/pricing/products/price-list/export-pdf", "POST",
|
||||
"pricing", "view",
|
||||
wrapV3(http.HandlerFunc(routes.ExportProductPriceListPDFHandler(pgDB))),
|
||||
)
|
||||
bindV3(r, pgDB,
|
||||
"/api/pricing/products/calculate-snapshots", "POST",
|
||||
"pricing", "update",
|
||||
wrapV3(routes.PostProductPricingCalculateSnapshotsHandler(pgDB)),
|
||||
)
|
||||
bindV3(r, pgDB,
|
||||
"/api/pricing/products/{code}/price-history", "GET",
|
||||
"pricing", "view",
|
||||
wrapV3(routes.GetProductPricingHistoryHandler(pgDB)),
|
||||
)
|
||||
bindV3(r, pgDB,
|
||||
"/api/pricing/products/{code}/price-history/delete-latest", "POST",
|
||||
"pricing", "update",
|
||||
wrapV3(routes.PostDeleteLatestProductPriceHistoryHandler(pgDB)),
|
||||
)
|
||||
bindV3(r, pgDB,
|
||||
"/api/pricing/products/{code}/price-history/delete-selected", "POST",
|
||||
"pricing", "update",
|
||||
wrapV3(routes.PostDeleteSelectedProductPriceHistoryHandler(pgDB)),
|
||||
)
|
||||
bindV3(r, pgDB,
|
||||
"/api/pricing/products/save", "POST",
|
||||
"pricing", "update",
|
||||
wrapV3(routes.PostProductPricingSaveHandler(pgDB, ml)),
|
||||
)
|
||||
bindV3(r, pgDB,
|
||||
"/api/pricing/brand-classification/lookups", "GET",
|
||||
"pricing", "view",
|
||||
@@ -830,6 +865,16 @@ func InitRoutes(pgDB *sql.DB, mssql *sql.DB, ml *mailer.GraphMailer) *mux.Router
|
||||
"pricing", "update",
|
||||
wrapV3(routes.SetBrandGroupsBulkHandler(pgDB)),
|
||||
)
|
||||
bindV3(r, pgDB,
|
||||
"/api/pricing/brand-group-currency", "GET",
|
||||
"pricing", "view",
|
||||
wrapV3(routes.GetBrandGroupCurrencyHandler(pgDB)),
|
||||
)
|
||||
bindV3(r, pgDB,
|
||||
"/api/pricing/brand-group-currency/bulk-save", "POST",
|
||||
"pricing", "update",
|
||||
wrapV3(routes.SaveBrandGroupCurrencyHandler(pgDB)),
|
||||
)
|
||||
bindV3(r, pgDB,
|
||||
"/api/pricing/pricing-rules", "GET",
|
||||
"pricing", "view",
|
||||
@@ -1162,6 +1207,9 @@ func main() {
|
||||
if err := queries.EnsurePricingParameterTables(pgDB); err != nil {
|
||||
log.Println("mk_urunpricingprmtr bootstrap failed:", err)
|
||||
}
|
||||
if err := queries.EnsurePricingCalcInfraTables(pgDB); err != nil {
|
||||
log.Println("pricing calc infra bootstrap failed:", err)
|
||||
}
|
||||
|
||||
// -------------------------------------------------------
|
||||
// ✉️ MAILER INIT
|
||||
@@ -1184,6 +1232,8 @@ func main() {
|
||||
startTranslationSyncScheduler(pgDB, db.MssqlDB)
|
||||
startBrandSyncScheduler(pgDB, db.MssqlDB)
|
||||
startPricingParameterSyncScheduler(pgDB, db.MssqlDB)
|
||||
startProductPricingFxDeltaScheduler(pgDB)
|
||||
startProductPricingFxFullScheduler(pgDB)
|
||||
|
||||
handler := enableCORS(
|
||||
middlewares.GlobalAuthMiddleware(
|
||||
|
||||
Reference in New Issue
Block a user