Setting up stub pages
This commit is contained in:
		@ -367,3 +367,15 @@ func (app *application) ShowResetPassword(w http.ResponseWriter, r *http.Request
 | 
			
		||||
		app.errorLog.Println(err)
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (app *application) AllSales(w http.ResponseWriter, r *http.Request) {
 | 
			
		||||
	if err := app.renderTemplate(w, r, "all-sales", &templateData{}); err != nil {
 | 
			
		||||
		app.errorLog.Println(err)
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (app *application) AllSubscriptions(w http.ResponseWriter, r *http.Request) {
 | 
			
		||||
	if err := app.renderTemplate(w, r, "all-subscriptions", &templateData{}); err != nil {
 | 
			
		||||
		app.errorLog.Println(err)
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -15,6 +15,8 @@ func (app *application) routes() http.Handler {
 | 
			
		||||
	mux.Route("/admin", func(mux chi.Router) {
 | 
			
		||||
		mux.Use(app.Auth)
 | 
			
		||||
		mux.Get("/virtual-terminal", app.VirtualTerminal)
 | 
			
		||||
		mux.Get("/all-sales", app.AllSales)
 | 
			
		||||
		mux.Get("/all-subscriptions", app.AllSubscriptions)
 | 
			
		||||
	})
 | 
			
		||||
 | 
			
		||||
	// mux.Post("/virtual-terminal-payment-succeeded", app.VirtualTerminalPaymentSucceeded)
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										14
									
								
								cmd/web/templates/all-sales.page.gohtml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								cmd/web/templates/all-sales.page.gohtml
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,14 @@
 | 
			
		||||
{{template "base" .}}
 | 
			
		||||
 | 
			
		||||
{{define "title"}}
 | 
			
		||||
All Subscriptions
 | 
			
		||||
{{end}}
 | 
			
		||||
 | 
			
		||||
{{define "content"}}
 | 
			
		||||
<h2 class="mt-5">All Sales</h2>
 | 
			
		||||
<hr>
 | 
			
		||||
{{end}}
 | 
			
		||||
 | 
			
		||||
{{define "js"}}
 | 
			
		||||
{{end}}
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										13
									
								
								cmd/web/templates/all-subscriptions.page.gohtml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								cmd/web/templates/all-subscriptions.page.gohtml
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,13 @@
 | 
			
		||||
{{template "base" .}}
 | 
			
		||||
 | 
			
		||||
{{define "title"}}
 | 
			
		||||
All Subscriptions
 | 
			
		||||
{{end}}
 | 
			
		||||
 | 
			
		||||
{{define "content"}}
 | 
			
		||||
<h2 class="mt-5">All Subscriptions</h2>
 | 
			
		||||
<hr>
 | 
			
		||||
{{end}}
 | 
			
		||||
 | 
			
		||||
{{define "js"}}
 | 
			
		||||
{{end}}
 | 
			
		||||
@ -47,9 +47,6 @@
 | 
			
		||||
                                </li>
 | 
			
		||||
                            </ul>
 | 
			
		||||
                        </li>
 | 
			
		||||
                        <li id="vt-link" class="nav-item d-none">
 | 
			
		||||
                            <a class="nav-link" href="/admin/virtual-terminal">Virtual Terminal</a>
 | 
			
		||||
                        </li>
 | 
			
		||||
                        {{ if eq .IsAuthenticated 1 }}
 | 
			
		||||
                        <li class="nav-item dropdown">
 | 
			
		||||
                            <a class="nav-link dropdown-toggle"
 | 
			
		||||
@ -68,7 +65,7 @@
 | 
			
		||||
                                    <a class="dropdown-item" href="/admin/all-sales">All Sales</a>
 | 
			
		||||
                                </li>
 | 
			
		||||
                                <li>
 | 
			
		||||
                                    <a class="dropdown-item" href="/admin/all-subscriptions">All Sales</a>
 | 
			
		||||
                                    <a class="dropdown-item" href="/admin/all-subscriptions">All Subscriptions</a>
 | 
			
		||||
                                </li>
 | 
			
		||||
                                <li>
 | 
			
		||||
                                    <hr class="dropdown-divider">
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user