mirror of
https://github.com/lyx0/nourybot.git
synced 2024-11-13 19:49:55 +01:00
change paste url
This commit is contained in:
parent
a0bd453132
commit
8e432a5ee0
2 changed files with 3 additions and 3 deletions
|
@ -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}
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue