(mux *http.ServeMux, db *sql.DB, store *storage.AttachmentStore, prefix, table string)
| 26 | } |
| 27 | |
| 28 | func registerAttachmentsForModule(mux *http.ServeMux, db *sql.DB, store *storage.AttachmentStore, prefix, table string) { |
| 29 | mux.HandleFunc("GET "+prefix+"/{uuid}", listAttachments(db, table)) |
| 30 | mux.HandleFunc("GET "+prefix+"/{eventUuid}/{uuid}", downloadAttachment(db, store, table)) |
| 31 | mux.HandleFunc("GET "+prefix+"/{eventUuid}/preview/{uuid}", previewAttachment(db, store, table)) |
| 32 | } |
| 33 | |
| 34 | func listAttachments(db *sql.DB, table string) http.HandlerFunc { |
| 35 | return func(w http.ResponseWriter, r *http.Request) { |
no test coverage detected