From 5cc70cc65667d40048f274efe0528ed13b189666 Mon Sep 17 00:00:00 2001 From: Elizabeth Hunt Date: Fri, 3 Jan 2025 01:50:07 -0800 Subject: [PATCH] make it a password --- api/api.go | 2 +- templates/home.html | 4 ++-- templates/messages.html | 3 +++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/api/api.go b/api/api.go index a887604..07db731 100644 --- a/api/api.go +++ b/api/api.go @@ -89,7 +89,7 @@ func MakeMux(argv *args.Arguments, dbConn *sql.DB) *http.ServeMux { LogRequestContinuation(requestContext, r, w)(template.TemplateContinuation(templateFile, true), FailurePassingContinuation)(LogExecutionTimeContinuation, LogExecutionTimeContinuation)(IdContinuation, IdContinuation) }) - mux.HandleFunc("GET /chat", func(w http.ResponseWriter, r *http.Request) { + mux.HandleFunc("POST /chat/me", func(w http.ResponseWriter, r *http.Request) { requestContext := makeRequestContext() LogRequestContinuation(requestContext, r, w)(chat.ValidateFren, FailurePassingContinuation)(template.TemplateContinuation("chat.html", true), FailurePassingContinuation)(LogExecutionTimeContinuation, LogExecutionTimeContinuation)(IdContinuation, IdContinuation) }) diff --git a/templates/home.html b/templates/home.html index 7e8ecb7..8594993 100644 --- a/templates/home.html +++ b/templates/home.html @@ -1,8 +1,8 @@ {{ define "content" }}

please use this if you know who i am and know how to use this but need to get ahold of me while im away from computers.

-
+ - +
{{ end }} diff --git a/templates/messages.html b/templates/messages.html index e09ac46..85764e3 100644 --- a/templates/messages.html +++ b/templates/messages.html @@ -1,5 +1,8 @@ {{ define "content" }}
+ {{ if (eq (len .Messages) 0) }} +

nothing here so far...

+ {{ end }} {{ range $message := .Messages }}