mirror of
https://github.com/owncast/owncast.git
synced 2024-11-28 11:09:01 +03:00
0b5d7c8a4d
* WIP * fix(test): fix ap test failing * fix: fix unkeyed fields being used * chore(tests): clean up browser tests by splitting out federation UI tests
21 lines
622 B
Go
21 lines
622 B
Go
package admin
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"github.com/owncast/owncast/persistence/configrepository"
|
|
webutils "github.com/owncast/owncast/webserver/utils"
|
|
log "github.com/sirupsen/logrus"
|
|
)
|
|
|
|
// ResetYPRegistration will clear the YP protocol registration key.
|
|
func ResetYPRegistration(w http.ResponseWriter, r *http.Request) {
|
|
log.Traceln("Resetting YP registration key")
|
|
configRepository := configrepository.Get()
|
|
if err := configRepository.SetDirectoryRegistrationKey(""); err != nil {
|
|
log.Errorln(err)
|
|
webutils.WriteSimpleResponse(w, false, err.Error())
|
|
return
|
|
}
|
|
webutils.WriteSimpleResponse(w, true, "reset")
|
|
}
|