mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-20 20:07:03 +01:00
feat: parse for all ForgeFed actors
This commit is contained in:
parent
8273f8b756
commit
f7ca56557c
1 changed files with 33 additions and 32 deletions
|
@ -82,38 +82,39 @@ func WebfingerQuery(ctx *context.Context) {
|
|||
switch len(parts) {
|
||||
case 1: // user
|
||||
u, err = user_model.GetUserByName(ctx, parts[0])
|
||||
// case 2: // repository
|
||||
// ctx.Error(http.StatusNotFound)
|
||||
// return
|
||||
//
|
||||
// case 3:
|
||||
// switch parts[2] {
|
||||
// case "issues":
|
||||
// ctx.Error(http.StatusNotFound)
|
||||
// return
|
||||
//
|
||||
// case "pulls":
|
||||
// ctx.Error(http.StatusNotFound)
|
||||
// return
|
||||
//
|
||||
// case "projects":
|
||||
// ctx.Error(http.StatusNotFound)
|
||||
// return
|
||||
//
|
||||
// default:
|
||||
// ctx.Error(http.StatusNotFound)
|
||||
// return
|
||||
//
|
||||
// }
|
||||
// case 4:
|
||||
// if parts[3] == "teams" {
|
||||
// ctx.Error(http.StatusNotFound)
|
||||
// return
|
||||
//
|
||||
// } else {
|
||||
// ctx.Error(http.StatusNotFound)
|
||||
// return
|
||||
// }
|
||||
case 2: // repository
|
||||
ctx.Error(http.StatusNotFound)
|
||||
return
|
||||
|
||||
case 3:
|
||||
switch parts[2] {
|
||||
case "issues":
|
||||
ctx.Error(http.StatusNotFound)
|
||||
return
|
||||
|
||||
case "pulls":
|
||||
ctx.Error(http.StatusNotFound)
|
||||
return
|
||||
|
||||
case "projects":
|
||||
ctx.Error(http.StatusNotFound)
|
||||
return
|
||||
|
||||
default:
|
||||
ctx.Error(http.StatusNotFound)
|
||||
return
|
||||
|
||||
}
|
||||
case 4:
|
||||
//nolint:gocritic
|
||||
if parts[3] == "teams" {
|
||||
ctx.Error(http.StatusNotFound)
|
||||
return
|
||||
|
||||
} else {
|
||||
ctx.Error(http.StatusNotFound)
|
||||
return
|
||||
}
|
||||
|
||||
default:
|
||||
ctx.Error(http.StatusNotFound)
|
||||
|
|
Loading…
Reference in a new issue