edit: unique code shortlink ambil dari tabel shortcodes

This commit is contained in:
mario
2025-05-16 09:11:36 +07:00
parent d2ec8c0f07
commit 28339e855c
6 changed files with 384 additions and 34 deletions

View File

@@ -108,6 +108,9 @@ func SetupRouter(cfg *config.Config, logger *zap.Logger) http.Handler {
shortLinkHandler := handlers.NewShortLinkHandler(logger, shortLinkService)
r.Post("/generate-link", shortLinkHandler.GenerateShortLink)
// Shortcode recycling - only for admin role (role check is in the handler)
r.Post("/recycle-shortcode", shortLinkHandler.RecycleShortcodes)
// DICOM Web routes
r.Route("/dicomWeb", func(r chi.Router) {
// Add audit logging middleware to DICOM routes