MCPcopy Create free account
hub / github.com/AlistGo/auth / ErrorStr

Function ErrorStr

app/common.go:12–20  ·  view source on GitHub ↗
(c *gin.Context, str string, codes ...int)

Source from the content-addressed store, hash-verified

10}
11
12func ErrorStr(c *gin.Context, str string, codes ...int) {
13 code := 200
14 if len(codes) > 0 {
15 code = codes[0]
16 }
17 c.JSON(code, gin.H{
18 "error": str,
19 })
20}
21
22func JsonBytes(c *gin.Context, body []byte) {
23 c.Header("Content-Type", gin.MIMEJSON)

Callers 7

onedriveTokenFunction · 0.85
spSiteIDFunction · 0.85
ErrorFunction · 0.85
getStatus115Function · 0.85
getToken115Function · 0.85
dropboxTokenFunction · 0.85
baiduTokenFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected