5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-15 02:11:42 +00:00
panel/app/controllers/sites_controller.rb

33 lines
591 B
Ruby
Raw Normal View History

2018-01-29 22:19:10 +00:00
# Controlador de sitios
2018-01-29 18:09:30 +00:00
class SitesController < ApplicationController
before_action :authenticate!
2018-01-29 22:19:10 +00:00
# Ver un listado de sitios
2018-01-29 18:09:30 +00:00
def index
2018-01-29 22:19:10 +00:00
@sites = current_user.sites
end
# No tenemos propiedades de un sitio aún, así que vamos al listado de
# artículos
def show
site = find_site
redirect_to site_posts_path(site)
2018-01-29 18:09:30 +00:00
end
2018-02-20 17:47:11 +00:00
def enqueue
@site = find_site
@site.enqueue!
redirect_to sites_path
end
def build_log
@site = find_site
render file: @site.build_log,
layout: false,
2018-04-30 17:22:31 +00:00
content_type: 'text/plain; charset=utf-8'
2018-02-20 17:47:11 +00:00
end
2018-01-29 18:09:30 +00:00
end