change paste url

This commit is contained in:
lyx0 2024-02-20 19:15:14 +01:00
parent a0bd453132
commit 8e432a5ee0
2 changed files with 3 additions and 3 deletions

View file

@ -13,7 +13,7 @@ import (
// this whole function was pretty much yoinked from here // this whole function was pretty much yoinked from here
// https://github.com/zneix/haste-client/blob/master/main.go <3 // https://github.com/zneix/haste-client/blob/master/main.go <3
func (app *application) uploadPaste(text string) (string, error) { func (app *application) uploadPaste(text string) (string, error) {
const hasteURL = "https://haste.dank.pw" const hasteURL = "https://haste.noury.li"
const apiRoute = "/documents" const apiRoute = "/documents"
var httpClient = &http.Client{Timeout: 10 * time.Second} var httpClient = &http.Client{Timeout: 10 * time.Second}

View file

@ -5,7 +5,7 @@ import (
"encoding/json" "encoding/json"
"fmt" "fmt"
"html/template" "html/template"
"io/ioutil" "io"
"log" "log"
"net/http" "net/http"
"os" "os"
@ -43,7 +43,7 @@ type eventSubNotification struct {
} }
func (app *application) eventsubFollow(w http.ResponseWriter, r *http.Request, _ httprouter.Params) { func (app *application) eventsubFollow(w http.ResponseWriter, r *http.Request, _ httprouter.Params) {
body, err := ioutil.ReadAll(r.Body) body, err := io.ReadAll(r.Body)
if err != nil { if err != nil {
log.Println(err) log.Println(err)
return return