mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-22 10:56:22 +00:00
48 lines
1.4 KiB
Ruby
48 lines
1.4 KiB
Ruby
# frozen_string_literal: true
|
|
|
|
Rails.application.routes.draw do
|
|
devise_for :usuaries
|
|
|
|
root 'application#index'
|
|
|
|
get 'markdown', to: 'application#markdown'
|
|
|
|
# XXX Mantenemos solo esta ruta acá porque form_for no reconoce @site
|
|
# como un objeto válido
|
|
resources :invitadxs, only: [:create]
|
|
|
|
resources :sites, constraints: { site_id: %r{[^/]+}, id: %r{[^/]+} } do
|
|
get 'public/:type/:basename', to: 'sites#send_public_file'
|
|
|
|
# Gestionar actualizaciones del sitio
|
|
get 'pull', to: 'sites#fetch'
|
|
post 'pull', to: 'sites#merge'
|
|
|
|
# Gestionar usuaries
|
|
get 'usuaries/invite', to: 'usuaries#invite'
|
|
post 'usuaries/invite', to: 'usuaries#send_invitations'
|
|
patch 'usuaries/accept_invitation', to: 'usuaries#accept_invitation'
|
|
patch 'usuaries/reject_invitation', to: 'usuaries#reject_invitation'
|
|
resources :usuaries do
|
|
patch 'demote', to: 'usuaries#demote'
|
|
patch 'promote', to: 'usuaries#promote'
|
|
end
|
|
|
|
get 'collaborate', to: 'collaborations#collaborate'
|
|
post 'collaborate', to: 'collaborations#accept_collaboration'
|
|
|
|
# Gestionar artículos
|
|
resources :posts
|
|
|
|
# Gestionar traducciones
|
|
get 'i18n', to: 'i18n#index'
|
|
get 'i18n/edit', to: 'i18n#edit'
|
|
post 'i18n', to: 'i18n#update'
|
|
|
|
# Compilar el sitio
|
|
post 'enqueue', to: 'sites#enqueue'
|
|
post 'reorder_posts', to: 'sites#reorder_posts'
|
|
|
|
resources :stats, only: [:index]
|
|
end
|
|
end
|