fix: hide offline posts from get route

This commit is contained in:
Florian Sylvain
2024-06-14 16:46:16 +02:00
parent c69876a704
commit 7e29c08ea9
+1 -1
View File
@@ -24,7 +24,7 @@ func getPost(w http.ResponseWriter, r *http.Request) {
} }
localPost, err := Container.GetPostUseCase.GetPost(uint32(id)) localPost, err := Container.GetPostUseCase.GetPost(uint32(id))
if err != nil { if err != nil || !localPost.IsOnline {
http.Error(w, "The requested resource, identified by its unique ID, could not be found on the server.", http.StatusNotFound) http.Error(w, "The requested resource, identified by its unique ID, could not be found on the server.", http.StatusNotFound)
return return
} }