Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: move API endpoints to route handlers #572

Merged
merged 3 commits into from
Oct 15, 2024
Merged

refactor: move API endpoints to route handlers #572

merged 3 commits into from
Oct 15, 2024

Conversation

alexgoff
Copy link
Contributor

@alexgoff alexgoff commented Oct 11, 2024

Migrates Next endpoints from pages directory to app directory and adds tests for each handler.

Testing

  • Preview
    • Preview an edited page from the Craft entry and verify live reload
    • Click "view" on an edited page from the Craft entry and verify the preview token is present
    • Click "view" on an unedited page from the Craft entry and verify no preview token is present
  • Revalidate
    • Run a production Next build
    • Edit an entry in Craft and save
    • Refresh page in client and verify update
  • Google auth
    • The fastest way to get to login/signup is to scale down the browser window until the slideout menu shows a "login/signup" option (this shouldn't be there but that's another ticket)
    • Sign up with your Noirlab email (might need to re-assign your admin account to LSST temporarily), registration should issue an activation token, if you make it to this point then the Google auth token has already worked it's magic

Run new E2E tests and validated

export async function POST(request: NextRequest): Promise<NextResponse> {
const { code } = await request.json();

console.log({ code });
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is throwing a lint error

@ericdrosas87
Copy link
Contributor

Everything, but the Google sign-up is working as expected. When attempting to sign up with my Google account I see the error in the attached screenshot.
Screenshot 2024-10-15 at 3 01 31 PM

@ericdrosas87
Copy link
Contributor

Likely the above issue I posted about is isolated to my local environment, approving this PR

@alexgoff alexgoff merged commit 93c68e4 into develop Oct 15, 2024
2 checks passed
alexgoff added a commit that referenced this pull request Oct 15, 2024
* chore: trigger build

* chore: trigger build

* refactor: move API endpoints to route handlers
alexgoff added a commit that referenced this pull request Oct 16, 2024
* chore: trigger build

* chore: trigger build

* refactor: move API endpoints to route handlers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants