all repos — honk @ 9863222e3d1eca86243a5e9e45970ea0fff4b939

my fork of honk

u
Anirudh Oppiliappan x@icyphox.sh
Tue, 26 Sep 2023 00:23:35 +0300
commit

9863222e3d1eca86243a5e9e45970ea0fff4b939

parent

cf32f4195157a2c693d8994bfa2453bac00bffe6

2 files changed, 8 insertions(+), 1 deletions(-)

jump to
M masto.gomasto.go

@@ -25,6 +25,12 @@ rw.Header().Set("Content-Type", "application/json; charset=utf-8")

rw.Write(j.ToBytes()) } +func showoauthlogin(rw http.ResponseWriter, r *http.Request) { + if err := readviews.Execute(rw, "oauthlogin.html", ""); err != nil { + elog.Println(err) + } +} + // https://docs.joinmastodon.org/methods/apps/#create func apiapps(rw http.ResponseWriter, r *http.Request) { if err := r.ParseForm(); err != nil {
M web.goweb.go

@@ -2871,6 +2871,7 @@ viewDir+"/views/msg.html",

viewDir+"/views/header.html", viewDir+"/views/onts.html", viewDir+"/views/emus.html", + viewDir+"/views/oauthlogin.html", viewDir+"/views/honkpage.js", ) if !develMode {

@@ -2986,7 +2987,7 @@ // mastoshit

mastopost := mux.Methods("POST").Subrouter() mastoget := mux.Methods("GET").Subrouter() - mastoget.HandleFunc("/oauth/authorize", oauthorize) + mastoget.HandleFunc("/oauth/authorize", showoauthlogin) mastoget.HandleFunc("/api/v1/instance", instance) mastopost.HandleFunc("/api/v1/apps", apiapps)