public inbox for [email protected]
 help / color / mirror / Atom feed
* [PATCH buubuu v1 0/5] Login and Register page
@ 2022-05-27 20:34 Alviro Iskandar Setiawan
  2022-05-27 20:39 ` [PATCH buubuu v1 1/5] view: Create register.html Alviro Iskandar Setiawan
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Alviro Iskandar Setiawan @ 2022-05-27 20:34 UTC (permalink / raw)
  To: Fernanda Ma'rouf, Akiekano
  Cc: GNU/Weeb Mailing List, Alviro Iskandar Setiawan

Hi,

This series adds a Login and Register page. There are 5 patches:

## Patch 1 and 2
Create these two view files:

   register.html
   login.html

Both of them will generate an XHR request upon form submission. The
content type of the request body will be in JSON format. The backend
then can later consume this JSON data that's sent by the frontend.

## Patch 3
Make Register() function in the auth-controller render the previously
created view, register.html. Only render this file when the user
visits this endpoint with HTTP method "GET".

## Patch 4
Make Login() function in the auth-controller render the previously
created view, login.html. Only render this file when the user visits
this endpoint with HTTP method "GET".

## Patch 5
Add these two routes:

   /auth/login POST authController.Register
   /auth/login GET  authController.login

for the login page and API endpoint.


Note:
Currently, the backend doesn't handle the JSON data sent by the
frontend. This is only the starting point where the frontend
sends the JSON data via a JavaScript XHR.

That's all. Please review, tq!

Signed-off-by: Alviro Iskandar Setiawan <[email protected]>
---
Alviro Iskandar Setiawan (5):
  view: Create register.html
  view: Create login.html
  auth-controller: Register: Render register.html on HTTP GET request
  auth-controller: Login: Render login.html on HTTP GET request
  server: auth: Create `/login` route

 controller/auth-controller.go | 13 ++++-
 server.go                     |  2 +
 view/login.html               | 70 +++++++++++++++++++++++++++
 view/register.html            | 84 +++++++++++++++++++++++++++++++++
 4 files changed, 168 insertions(+), 1 deletion(-)
 create mode 100644 view/login.html
 create mode 100644 view/register.html

base-commit: 0bcec53449298abf84a135435e6df95dfabcf5d6
-- 
Alviro Iskandar Setiawan

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-05-27 20:39 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-27 20:34 [PATCH buubuu v1 0/5] Login and Register page Alviro Iskandar Setiawan
2022-05-27 20:39 ` [PATCH buubuu v1 1/5] view: Create register.html Alviro Iskandar Setiawan
2022-05-27 20:39 ` [PATCH buubuu v1 2/5] view: Create login.html Alviro Iskandar Setiawan
2022-05-27 20:39 ` [PATCH buubuu v1 3/5] auth-controller: Register: Render register.html on HTTP GET request Alviro Iskandar Setiawan
2022-05-27 20:39 ` [PATCH buubuu v1 4/5] auth-controller: Login: Render login.html " Alviro Iskandar Setiawan
2022-05-27 20:39 ` [PATCH buubuu v1 5/5] server: auth: Create `/login` route Alviro Iskandar Setiawan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox