mirror of
https://github.com/schollz/cowyo.git
synced 2023-08-10 21:13:00 +03:00
Fixed folders for static
Former-commit-id: 821becb22ca90e6e106ee3ca37d2a957ac58da4b [formerly 734f56696913a4e6a5d6c183a2d7e5dadb42909a] [formerly 001ecf0c1b63cdd0ffd527cc6093e88e9c05f359 [formerly 4cc64325ba517ace0d5aeac8dc705f71b963a084 [formerly53117ac67a
]]] Former-commit-id: 80bdc184ef293ce91481ee5dc2f74a1d79c9d445 [formerly 6be2dc2f60b942a7c1f30794205c00c268b1a1f6] Former-commit-id: 181a7e62a50fe326cb34319eebc1eb54a73d2c61 Former-commit-id:3a455131cc
This commit is contained in:
parent
80ff1d5754
commit
1eeda05bac
@ -1,7 +1,6 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
|
||||||
"html/template"
|
"html/template"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"net/http"
|
"net/http"
|
||||||
@ -59,7 +58,6 @@ func everythingElse(c *gin.Context) {
|
|||||||
|
|
||||||
func serveStaticFile(c *gin.Context, option string) {
|
func serveStaticFile(c *gin.Context, option string) {
|
||||||
staticFile, err := ioutil.ReadFile(path.Join(RuntimeArgs.SourcePath, "static") + option)
|
staticFile, err := ioutil.ReadFile(path.Join(RuntimeArgs.SourcePath, "static") + option)
|
||||||
fmt.Println(path.Join(RuntimeArgs.SourcePath, "static"))
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
c.AbortWithStatus(404)
|
c.AbortWithStatus(404)
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user