Rework userfile yet again
I'm settling on the idea that strings should never be returned from the userfile system. Instead, indicate which collection you want and pass objects across.
This commit is contained in:
parent
c2d84b8734
commit
fdd783c19c
10 changed files with 198 additions and 160 deletions
|
|
@ -68,7 +68,7 @@ func apiAudioContentPost(w http.ResponseWriter, r *http.Request, u *models.User)
|
|||
http.Error(w, "Failed to parse image UUID", http.StatusBadRequest)
|
||||
return
|
||||
}
|
||||
err = userfile.AudioFileContentWrite(audioUUID, r.Body)
|
||||
err = userfile.FileContentWrite(r.Body, userfile.CollectionAudioRaw, audioUUID)
|
||||
if err != nil {
|
||||
log.Printf("Failed to write content file: %v", err)
|
||||
http.Error(w, "failed to write content file", http.StatusInternalServerError)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue