fix: hide offline posts from get route
This commit is contained in:
1 parent
c69876a704
commit
7e29c08ea9
1 file changed
+1
-1
+1
-1
@@ -24,7 +24,7 @@ func getPost(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
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)
|
||||
return
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user