feat(storage): add native PostgreSQL runtime and verified offline application import
Build and publish container images / images (push) Failing after 12m29s
Build and publish container images / images (push) Failing after 12m29s
This commit is contained in:
1 parent
96065d1e89
commit
0ba1dcfef0
243 files changed
+21441
-3090
No files matched your search
@@ -38,16 +38,11 @@ func (s *Server) handleRestoreRevisionAPI(w http.ResponseWriter, r *http.Request
|
||||
http.Error(w, "forbidden", 403)
|
||||
return
|
||||
}
|
||||
revision, err := s.store.GetRevision(input.Revision)
|
||||
if err != nil {
|
||||
http.Error(w, "revision unavailable", 500)
|
||||
return
|
||||
}
|
||||
message := strings.TrimSpace(input.Message)
|
||||
if message == "" {
|
||||
message = "Restore revision " + revision.UUID
|
||||
message = "Restore revision " + metadata.UUID
|
||||
}
|
||||
saved, err := s.store.SaveRevisionContentIfHead(revision.ObjectUUID, []byte(revision.Body), message, revision.Language, revision.ContentType, revision.Filename, input.Expected)
|
||||
saved, err := s.store.RestoreRevisionInDomain(r.Context(), s.domainUUIDForRequest(r), "", input.Revision, input.Expected, message)
|
||||
if errors.Is(err, store.ErrRevisionConflict) {
|
||||
http.Error(w, "revision changed; reload history", 412)
|
||||
return
|
||||
@@ -57,5 +52,5 @@ func (s *Server) handleRestoreRevisionAPI(w http.ResponseWriter, r *http.Request
|
||||
return
|
||||
}
|
||||
w.Header().Set("Cache-Control", "no-store")
|
||||
writeEventJSON(w, 200, map[string]string{"revision_uuid": saved.UUID, "object_uuid": revision.ObjectUUID})
|
||||
writeEventJSON(w, 200, map[string]string{"revision_uuid": saved.UUID, "object_uuid": saved.ObjectUUID})
|
||||
}
|
||||
Reference in new issue
Block a user