package handler

import (
	"net/http"
)

func (h *Handler) showStatusView(w http.ResponseWriter, r *http.Request) {
	protectClickJacking(w)
	user, _ := h.sess.Get(r)
	status, err := h.storage.StatusById(RouteInt64Param(r, "id"))
	if err != nil {
		serverError(w, err)
		return
	}
	h.renderLayout(w, "status", map[string]interface{}{
		"status": status,
	}, user)
}
