Offline first
This commit is contained in:
parent
84181858c8
commit
f37ebc1c41
4 changed files with 81 additions and 16 deletions
10
main.go
10
main.go
|
|
@ -132,6 +132,7 @@ func main() { // {{{
|
|||
http.HandleFunc("/notes2", pageNotes2)
|
||||
http.HandleFunc("/login", pageLogin)
|
||||
http.HandleFunc("/sync", pageSync)
|
||||
http.HandleFunc("/offline", pageOffline)
|
||||
|
||||
http.HandleFunc("/user/authenticate", AuthManager.AuthenticationHandler)
|
||||
|
||||
|
|
@ -226,6 +227,15 @@ func pageServiceWorker(w http.ResponseWriter, r *http.Request) { // {{{
|
|||
return
|
||||
}
|
||||
} // }}}
|
||||
func pageOffline(w http.ResponseWriter, r *http.Request) { // {{{
|
||||
page := NewPage("offline")
|
||||
|
||||
err := Webengine.Render(page, w, r)
|
||||
if err != nil {
|
||||
w.Write([]byte(err.Error()))
|
||||
return
|
||||
}
|
||||
} // }}}
|
||||
func pageLogin(w http.ResponseWriter, r *http.Request) { // {{{
|
||||
page := NewPage("login")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue