Rename cavage singing func, add import for server
All checks were successful
/ docker (push) Successful in 4m1s
All checks were successful
/ docker (push) Successful in 4m1s
This commit is contained in:
parent
5e13817563
commit
08f6de0bd7
39 changed files with 2035 additions and 364 deletions
16
web/debug/remoteServer.go
Normal file
16
web/debug/remoteServer.go
Normal file
|
@ -0,0 +1,16 @@
|
|||
package webdebug
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/rs/zerolog/hlog"
|
||||
|
||||
"git.mstar.dev/mstar/linstrom/activitypub"
|
||||
)
|
||||
|
||||
func importServerInfo(w http.ResponseWriter, r *http.Request) {
|
||||
target := r.FormValue("target")
|
||||
if _, err := activitypub.ImportRemoteServer(target); err != nil {
|
||||
hlog.FromRequest(r).Error().Err(err).Msg("Failed to import")
|
||||
}
|
||||
}
|
|
@ -27,8 +27,9 @@ func New(addr string) *Server {
|
|||
handler.HandleFunc("GET /delete", deleteUser)
|
||||
handler.HandleFunc("POST /post-as", postAs)
|
||||
handler.HandleFunc("GET /notes-for", notesFrom)
|
||||
handler.HandleFunc("GET /import", issueUserImport)
|
||||
handler.HandleFunc("GET /import-user", issueUserImport)
|
||||
handler.HandleFunc("GET /keys-for", returnKeypair)
|
||||
handler.HandleFunc("GET /import-server", importServerInfo)
|
||||
web := http.Server{
|
||||
Addr: addr,
|
||||
Handler: webutils.ChainMiddlewares(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue