Add editable pages

This commit is contained in:
2023-11-18 11:01:14 +11:00
parent 484259fab1
commit 53434423fd
25 changed files with 369 additions and 5 deletions

View File

@@ -0,0 +1,15 @@
require "down"
module Admin
module Commands
module Pages
class Create
include Deps["repos.page_repo"]
def call(page:)
page_repo.create(page)
end
end
end
end
end

View File

@@ -0,0 +1,17 @@
require "down"
module Admin
module Commands
module Pages
class Update
include Deps["repos.page_repo"]
def call(page:)
id = page_repo.find(slug: page[:slug]).id
page_repo.update(id, page)
end
end
end
end
end