fix: correct middleware ctx. key for versions
This commit is contained in:
parent
4515127e8a
commit
c730fd47c7
@ -280,9 +280,9 @@ func (rs *notesResource) CreateVersion(w http.ResponseWriter, r *http.Request) {
|
|||||||
// Handler for returning full data of the currently scoped note version. Identical to the beginning
|
// Handler for returning full data of the currently scoped note version. Identical to the beginning
|
||||||
// of the `RollbackNoteVersion` handler.
|
// of the `RollbackNoteVersion` handler.
|
||||||
func (rs *notesResource) GetFullVersion(w http.ResponseWriter, r *http.Request) {
|
func (rs *notesResource) GetFullVersion(w http.ResponseWriter, r *http.Request) {
|
||||||
fullVersion, ok := r.Context().Value(noteCtxKey{}).(*data.GetVersionRow)
|
fullVersion, ok := r.Context().Value(versionCtxKey{}).(*data.GetVersionRow)
|
||||||
if !ok {
|
if !ok {
|
||||||
respondError(w, http.StatusNotFound, "Note not found")
|
respondError(w, http.StatusNotFound, "Version not found")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user