mirror of
https://github.com/mickael-kerjean/filestash.git
synced 2025-10-29 00:55:51 +08:00
17 lines
329 B
Go
17 lines
329 B
Go
package ctrl
|
|
|
|
import (
|
|
. "github.com/mickael-kerjean/nuage/server/common"
|
|
"net/http"
|
|
)
|
|
|
|
func ConfigHandler(ctx App, res http.ResponseWriter, req *http.Request) {
|
|
c, err := ctx.Config.Export()
|
|
if err != nil {
|
|
res.Write([]byte("window.CONFIG = {}"))
|
|
return
|
|
}
|
|
res.Write([]byte("window.CONFIG = "))
|
|
res.Write([]byte(c))
|
|
}
|