mirror of
https://github.com/schollz/cowyo.git
synced 2023-08-10 21:13:00 +03:00
Fixed folders for static
Former-commit-id: 6701711c3597d13cd16f68da579ed89a711b833e [formerly 5ba71b45916adc7db79de25d5d62a173c68d4cbb] [formerly 0951e7752a9c537de37d476f488d3cfd904c1e3f [formerly a62b4349ff
]]
Former-commit-id: 0d412c492631d44d34ba2c60de638b2c2434e321 [formerly 63a390d0de91abe2b58b4b8d39d6f786e000724b]
Former-commit-id: 9620aa062aa6ca3bf703043888b51b667943436d
This commit is contained in:
parent
659c15b0bb
commit
f3fe0d27b9
@ -1,6 +1,7 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
"html/template"
|
"html/template"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"net/http"
|
"net/http"
|
||||||
@ -58,6 +59,7 @@ 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