package handler

import (
	"github.com/gorilla/csrf"
	"net/http"
	"status/model"
)

func (h *Handler) showNewStatusView(w http.ResponseWriter, r *http.Request) {
	protectClickJacking(w)
	_, err := h.getUser(r)
	if err != nil {
		unauthorized(w, r)
		return
	}
	h.view("create_status").Execute(w, map[string]interface{}{"status": &model.Status{}, csrf.TemplateTag: csrf.TemplateField(r)})
}
