|
|
@ -77,34 +77,66 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(. app get "/admin"
|
|
|
|
(. app get "/admin"
|
|
|
|
|
|
|
|
handlers/is-user-authorized
|
|
|
|
(handlers/admin-panel-handler-factory client))
|
|
|
|
(handlers/admin-panel-handler-factory client))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(. app use "/admin"
|
|
|
|
|
|
|
|
(handlers/user-not-authorized-factory))
|
|
|
|
|
|
|
|
|
|
|
|
(. app post "/htmx/search/articles/"
|
|
|
|
(. app post "/htmx/search/articles/"
|
|
|
|
(handlers/htmx-search-articles-handler-factory client))
|
|
|
|
(handlers/htmx-search-articles-handler-factory client))
|
|
|
|
|
|
|
|
|
|
|
|
(. app post "/htmx/articles/"
|
|
|
|
(. app post "/htmx/articles/"
|
|
|
|
|
|
|
|
handlers/is-user-authorized
|
|
|
|
(handlers/htmx-create-article-handler-factory client))
|
|
|
|
(handlers/htmx-create-article-handler-factory client))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(. app use "/htmx/articles/"
|
|
|
|
|
|
|
|
(handlers/user-not-authorized-factory))
|
|
|
|
|
|
|
|
|
|
|
|
(. app get "/htmx/articles/:id"
|
|
|
|
(. app get "/htmx/articles/:id"
|
|
|
|
(handlers/htmx-get-article-handler-factory client))
|
|
|
|
(handlers/htmx-get-article-handler-factory client))
|
|
|
|
|
|
|
|
|
|
|
|
(. app post "/htmx/admin/search/articles/"
|
|
|
|
(. app post "/htmx/admin/search/articles/"
|
|
|
|
|
|
|
|
handlers/is-user-authorized
|
|
|
|
(handlers/htmx-admin-search-articles-handler-factory client))
|
|
|
|
(handlers/htmx-admin-search-articles-handler-factory client))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(. app use "/htmx/admin/search/articles/"
|
|
|
|
|
|
|
|
(handlers/user-not-authorized-factory))
|
|
|
|
|
|
|
|
|
|
|
|
(. app get "/htmx/admin/rows/article/:id/"
|
|
|
|
(. app get "/htmx/admin/rows/article/:id/"
|
|
|
|
|
|
|
|
handlers/is-user-authorized
|
|
|
|
(handlers/htmx-get-article-row-handler-factory client))
|
|
|
|
(handlers/htmx-get-article-row-handler-factory client))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(. app use "/htmx/admin/rows/article/:id/"
|
|
|
|
|
|
|
|
(handlers/user-not-authorized-factory))
|
|
|
|
|
|
|
|
|
|
|
|
(. app patch "/htmx/admin/rows/article/:id/"
|
|
|
|
(. app patch "/htmx/admin/rows/article/:id/"
|
|
|
|
|
|
|
|
handlers/is-user-authorized
|
|
|
|
(handlers/htmx-update-article-handler-factory client))
|
|
|
|
(handlers/htmx-update-article-handler-factory client))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(. app use "/htmx/admin/rows/article/:id/"
|
|
|
|
|
|
|
|
(handlers/user-not-authorized-factory))
|
|
|
|
|
|
|
|
|
|
|
|
(. app delete "/htmx/admin/rows/article/:id/"
|
|
|
|
(. app delete "/htmx/admin/rows/article/:id/"
|
|
|
|
|
|
|
|
handlers/is-user-authorized
|
|
|
|
(handlers/htmx-delete-article-row-handler-factory client))
|
|
|
|
(handlers/htmx-delete-article-row-handler-factory client))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(. app use "/htmx/admin/rows/article/:id/"
|
|
|
|
|
|
|
|
(handlers/user-not-authorized-factory))
|
|
|
|
|
|
|
|
|
|
|
|
(. app get "/htmx/admin/modals/article/content/:id/"
|
|
|
|
(. app get "/htmx/admin/modals/article/content/:id/"
|
|
|
|
|
|
|
|
handlers/is-user-authorized
|
|
|
|
(handlers/htmx-get-article-preview-content-handler-factory client))
|
|
|
|
(handlers/htmx-get-article-preview-content-handler-factory client))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(. app use "/htmx/admin/modals/article/content/:id/"
|
|
|
|
|
|
|
|
(handlers/user-not-authorized-factory))
|
|
|
|
|
|
|
|
|
|
|
|
(. app get "/htmx/admin/modals/article/edit-content/:id/"
|
|
|
|
(. app get "/htmx/admin/modals/article/edit-content/:id/"
|
|
|
|
|
|
|
|
handlers/is-user-authorized
|
|
|
|
(handlers/htmx-get-article-edit-content-handler-factory client))
|
|
|
|
(handlers/htmx-get-article-edit-content-handler-factory client))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(. app use "/htmx/admin/modals/article/edit-content/:id/"
|
|
|
|
|
|
|
|
(handlers/user-not-authorized-factory))
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
(defn start
|
|
|
|
(defn start
|
|
|
|