1
0
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:
Zack Scholl
2016-02-08 10:05:14 -05:00
parent fe06f599bd
commit a62b4349ff

View File

@ -1,6 +1,7 @@
package main
import (
"fmt"
"html/template"
"io/ioutil"
"net/http"
@ -58,6 +59,7 @@ func everythingElse(c *gin.Context) {
func serveStaticFile(c *gin.Context, option string) {
staticFile, err := ioutil.ReadFile(path.Join(RuntimeArgs.SourcePath, "static") + option)
fmt.Println(path.Join(RuntimeArgs.SourcePath, "static"))
if err != nil {
c.AbortWithStatus(404)
} else {