mirror of https://github.com/synctv-org/synctv
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
419 B
Go
21 lines
419 B
Go
package auth
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"github.com/gin-gonic/gin"
|
|
"github.com/synctv-org/synctv/internal/bootstrap"
|
|
"github.com/synctv-org/synctv/server/model"
|
|
)
|
|
|
|
func OAuth2EnabledApi(ctx *gin.Context) {
|
|
data, err := bootstrap.Oauth2EnabledCache.Get(ctx)
|
|
if err != nil {
|
|
ctx.AbortWithStatusJSON(http.StatusInternalServerError, model.NewApiErrorResp(err))
|
|
return
|
|
}
|
|
ctx.JSON(200, gin.H{
|
|
"enabled": data,
|
|
})
|
|
}
|