Added redirects for other list services
This commit is contained in:
@ -1,8 +1,6 @@
|
||||
package home
|
||||
|
||||
import (
|
||||
"strings"
|
||||
|
||||
"github.com/aerogo/aero"
|
||||
"github.com/animenotifier/notify.moe/pages/frontpage"
|
||||
"github.com/animenotifier/notify.moe/utils"
|
||||
@ -16,12 +14,5 @@ func Get(ctx *aero.Context) string {
|
||||
return frontpage.Get(ctx)
|
||||
}
|
||||
|
||||
// Redirect
|
||||
prefix := "/"
|
||||
|
||||
if strings.HasPrefix(ctx.URI(), "/_") {
|
||||
prefix = "/_/"
|
||||
}
|
||||
|
||||
return ctx.Redirect(prefix + "+" + user.Nick + "/animelist/watching")
|
||||
return utils.SmartRedirect(ctx, "/+"+user.Nick+"/animelist/watching")
|
||||
}
|
||||
|
Reference in New Issue
Block a user