mirror of
1
Fork 0

feat: parse for all ForgeFed actors

This commit is contained in:
Aravinth Manivannan 2024-04-02 01:27:28 +05:30 committed by Earl Warren
parent 8273f8b756
commit f7ca56557c
1 changed files with 33 additions and 32 deletions

View File

@ -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)