make it a password
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Elizabeth Hunt 2025-01-03 01:50:07 -08:00
parent f163a24279
commit 5cc70cc656
Signed by: simponic
GPG Key ID: 2909B9A7FF6213EE
3 changed files with 6 additions and 3 deletions

View File

@ -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)
})

View File

@ -1,8 +1,8 @@
{{ define "content" }}
<p>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.</p>
<form action="/chat" method="GET" autocomplete="off">
<form action="/chat/me" method="POST" autocomplete="off">
<label for="fren_id">fren id.</label>
<input type="text" id="fren_id" name="fren_id">
<input type="password" id="fren_id" name="fren_id">
<input type="submit" value="login.">
</form>
{{ end }}

View File

@ -1,5 +1,8 @@
{{ define "content" }}
<div id="chat-container" class="chat-container">
{{ if (eq (len .Messages) 0) }}
<p>nothing here so far...</p>
{{ end }}
{{ range $message := .Messages }}
<div class="message {{if $message.FrenSent}}fren{{end}}">
<div class="message-text {{if $message.FrenSent}}fren{{end}}">