tagliatelle

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

include-routes.go (1487B)


      1 package main
      2 
      3 import (
      4 	"net/http"
      5 )
      6 
      7 // RegisterRoutes sets up all HTTP routes for the application
      8 func RegisterRoutes() {
      9 	// Page handlers
     10 	http.HandleFunc("/", listFilesHandler)
     11 	http.HandleFunc("/add", uploadHandler)
     12 	http.HandleFunc("/add-yt", ytdlpHandler)
     13 	http.HandleFunc("/admin", adminHandler)
     14 	http.HandleFunc("/bulk-tag", bulkTagHandler)
     15 	http.HandleFunc("/cbz/", cbzViewerHandler)
     16 	http.HandleFunc("/file/", fileRouter)
     17 	http.HandleFunc("/notes", notesViewHandler)
     18 	http.HandleFunc("/notes/apply-sed", notesApplySedHandler)
     19 	http.HandleFunc("/notes/export", notesExportHandler)
     20 	http.HandleFunc("/notes/filter", notesFilterHandler)
     21 	http.HandleFunc("/notes/import", notesImportHandler)
     22 	http.HandleFunc("/notes/preview", notesPreviewHandler)
     23 	http.HandleFunc("/notes/save", notesSaveHandler)
     24 	http.HandleFunc("/notes/stats", notesStatsHandler)
     25 	http.HandleFunc("/properties", propertiesIndexHandler)
     26 	http.HandleFunc("/property/", propertyFilterHandler)
     27 	http.HandleFunc("/search", searchHandler)
     28 	http.HandleFunc("/tag/", tagFilterHandler)
     29 	http.HandleFunc("/tags", tagsHandler)
     30 	http.HandleFunc("/thumbnails/generate", generateThumbnailHandler)
     31 	http.HandleFunc("/untagged", untaggedFilesHandler)
     32 	http.HandleFunc("/upload-url", uploadFromURLHandler)
     33 	// Static file serving
     34 	http.Handle("/uploads/", http.StripPrefix("/uploads/", http.FileServer(http.Dir(config.UploadDir))))
     35 	http.Handle("/static/", http.StripPrefix("/static/", http.FileServer(http.Dir("static"))))
     36 }