mirror of
https://github.com/Floriansylvain/RenewCMS.git
synced 2026-08-19 11:43:22 +02:00
fix: hide offline posts from get route
This commit is contained in:
+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