Compare commits
2 commits
d85ca37d54
...
6d362bcf22
Author | SHA1 | Date | |
---|---|---|---|
|
6d362bcf22 | ||
5a175ef04a |
1 changed files with 1 additions and 0 deletions
1
main.go
1
main.go
|
@ -32,6 +32,7 @@ func handleRequest(w http.ResponseWriter, r *http.Request) {
|
||||||
if urlExist(clearPath) {
|
if urlExist(clearPath) {
|
||||||
if strings.HasSuffix(path, "/raw") {
|
if strings.HasSuffix(path, "/raw") {
|
||||||
pasteContent := db.HGet(ctx, clearPath, "content").Val()
|
pasteContent := db.HGet(ctx, clearPath, "content").Val()
|
||||||
|
w.Header().Set("Content-Type", "text/plain")
|
||||||
_, err := io.WriteString(w, pasteContent)
|
_, err := io.WriteString(w, pasteContent)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Println(err)
|
log.Println(err)
|
||||||
|
|
Loading…
Reference in a new issue