feat: parse for all ForgeFed actors
This commit is contained in:
parent
8273f8b756
commit
f7ca56557c
|
@ -82,38 +82,39 @@ func WebfingerQuery(ctx *context.Context) {
|
||||||
switch len(parts) {
|
switch len(parts) {
|
||||||
case 1: // user
|
case 1: // user
|
||||||
u, err = user_model.GetUserByName(ctx, parts[0])
|
u, err = user_model.GetUserByName(ctx, parts[0])
|
||||||
// case 2: // repository
|
case 2: // repository
|
||||||
// ctx.Error(http.StatusNotFound)
|
ctx.Error(http.StatusNotFound)
|
||||||
// return
|
return
|
||||||
//
|
|
||||||
// case 3:
|
case 3:
|
||||||
// switch parts[2] {
|
switch parts[2] {
|
||||||
// case "issues":
|
case "issues":
|
||||||
// ctx.Error(http.StatusNotFound)
|
ctx.Error(http.StatusNotFound)
|
||||||
// return
|
return
|
||||||
//
|
|
||||||
// case "pulls":
|
case "pulls":
|
||||||
// ctx.Error(http.StatusNotFound)
|
ctx.Error(http.StatusNotFound)
|
||||||
// return
|
return
|
||||||
//
|
|
||||||
// case "projects":
|
case "projects":
|
||||||
// ctx.Error(http.StatusNotFound)
|
ctx.Error(http.StatusNotFound)
|
||||||
// return
|
return
|
||||||
//
|
|
||||||
// default:
|
default:
|
||||||
// ctx.Error(http.StatusNotFound)
|
ctx.Error(http.StatusNotFound)
|
||||||
// return
|
return
|
||||||
//
|
|
||||||
// }
|
}
|
||||||
// case 4:
|
case 4:
|
||||||
// if parts[3] == "teams" {
|
//nolint:gocritic
|
||||||
// ctx.Error(http.StatusNotFound)
|
if parts[3] == "teams" {
|
||||||
// return
|
ctx.Error(http.StatusNotFound)
|
||||||
//
|
return
|
||||||
// } else {
|
|
||||||
// ctx.Error(http.StatusNotFound)
|
} else {
|
||||||
// return
|
ctx.Error(http.StatusNotFound)
|
||||||
// }
|
return
|
||||||
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
ctx.Error(http.StatusNotFound)
|
ctx.Error(http.StatusNotFound)
|
||||||
|
|
Loading…
Reference in New Issue