remove qiwi from donate links and fix ts icon

also we have a reason
This commit is contained in:
nikk gitanes
2024-06-12 22:46:50 +03:00
parent b6328d6153
commit b44493c6c9
8 changed files with 45 additions and 40 deletions

View File

@@ -2,6 +2,7 @@ package api
import (
"net/http"
"strings"
"time"
sets "server/settings"
@@ -19,7 +20,8 @@ import (
// @Success 200
// @Router /shutdown [get]
func shutdown(c *gin.Context) {
if sets.ReadOnly {
reasonStr := strings.ReplaceAll(c.Param("reason"), `/`, "")
if sets.ReadOnly && reasonStr == "" {
c.Status(http.StatusForbidden)
return
}