1
0
mirror of https://github.com/lus/pasty.git synced 2023-08-10 21:13:09 +03:00

Implement deletion token toggle & master

This commit is contained in:
Lukas Schulte Pelkum
2021-04-20 16:38:00 +02:00
parent f9fc232afe
commit 542bb5b17d
7 changed files with 72 additions and 36 deletions

View File

@@ -51,8 +51,9 @@ func Serve() error {
v1Route := apiRoute.Group("/v1")
{
v1Route.GET("/info", func(ctx *fasthttp.RequestCtx) {
jsonData, _ := json.Marshal(map[string]string{
"version": static.Version,
jsonData, _ := json.Marshal(map[string]interface{}{
"version": static.Version,
"deletionTokens": config.Current.DeletionTokens,
})
ctx.SetBody(jsonData)
})