More details on posts and error reporting
This commit is contained in:
@@ -4,6 +4,7 @@ module Admin
|
||||
def list
|
||||
posts
|
||||
.where(post_type: "bookmark")
|
||||
.order(Sequel.lit("published_at desc"))
|
||||
.to_a
|
||||
end
|
||||
|
||||
|
@@ -38,6 +38,7 @@ module Admin
|
||||
def list
|
||||
posts
|
||||
.where(post_type: "post")
|
||||
.order(Sequel.lit("published_at desc"))
|
||||
.to_a
|
||||
end
|
||||
|
||||
@@ -45,6 +46,10 @@ module Admin
|
||||
posts.where(id: id).delete
|
||||
end
|
||||
|
||||
def publish(id:)
|
||||
posts.where(id: id).update(published_at: Time.now)
|
||||
end
|
||||
|
||||
def archive(id:)
|
||||
posts.where(id: id).update(published_at: nil)
|
||||
end
|
||||
|
Reference in New Issue
Block a user