mirror of
https://github.com/schollz/cowyo.git
synced 2023-08-10 21:13:00 +03:00
Fixed folders for static
This commit is contained in:
parent
a62b4349ff
commit
53117ac67a
@ -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