change route /admin to /admin-login but click on dashbord it redirect to /admin

default discord avatar
bhavikak
last month
21


i'm waiting for response guy's

  • default discord avatar
    thisisnotchris
    last month

    Hello @bhavikak !



    Did you try

    https://discord.com/channels/967097582721572934/1069354467687927859/1069354467687927859


    Updating yhour routes config?

  • default discord avatar
    bhavikak
    last month

    yes @thisisnotchris i added routes: {


    admin: '/oclogin',


    }, in payload.config.ts file

  • discord user avatar
    jesschow
    Payload Team
    last month

    hey @bhavikak - what version of payload are you on? what you have done looks correct, the code you shared above should be all you need.



    To double check, your routes are defined at the top level of

    buildConfig

    within your

    payload.config.ts

    file correct?

    Screen_Shot_2023-04-10_at_5.41.35_PM.png
  • default discord avatar
    bhavikak
    last month

    hiii @jesschow my payload version is "payload": "^1.2.5",



    yes i checked my payload.config.ts it's same as to your example that you give.

  • default discord avatar
    thisisnotchris
    last month

    @bhavikak Can we check out your config file?

  • default discord avatar
    bhavikak
    last month

    yes @thisisnotchris

  • discord user avatar
    jesschow
    Payload Team
    last month

    @bhavikak so you're finding that the custom admin route isn't taking effect?

  • default discord avatar
    thisisnotchris
    last month

    @bhavikak Have you tried upgrading your version of Payload to latest?

  • discord user avatar
    Jarrod
    Payload Team
    last month

    This does work, I just tested it. I would ensure you are running in dev mode or you have rebuilt your project if you are running a prod version.

  • default discord avatar
    bhavikak
    last month

    @jesschow custom admin route working fine but only on breadcrumb issue is accrued.



    yes i tried to update version. but after updating payload version when i run the project i'm getting thi error.



    Screenshot_from_2023-04-13_15-33-24.png
  • default discord avatar
    thisisnotchris
    last month

    @bhavikak This issue seems unrelated to the original issue, but still an issue



    I'm wondering if it's specific to the one-click payload install



    Though, this seems like a graphQL issue with parsing enum values?

  • default discord avatar
    bhavikak
    last month

    i don't think so this issue is specific to one-click payload install.



    @Jarrod i didn't rebuilt my project.

Open the post
Continue the discussion in Discord
Like what we're doing?
Star us on GitHub!

Star

Connect with the Payload Community on Discord

Discord

online

Can't find what you're looking for?

Get help straight from the Payload team with an Enterprise License.