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

Rest endpoint to load by projectId #1863

Merged
merged 4 commits into from
Jun 28, 2023
Merged

Rest endpoint to load by projectId #1863

merged 4 commits into from
Jun 28, 2023

Conversation

andrasbacsai
Copy link
Contributor

@andrasbacsai andrasbacsai commented Jun 26, 2023

Description

  1. What is this PR about (link the issue and add a short description)
    Add REST endpoint to get the latest buildId based on projectId:
    /rest/buildId/<projectId>

Should return buildId or null (which means the project is not published yet).

It is required for the new CLI.

Steps for reproduction

  1. click button
  2. expect xyz

Code Review

  • hi @kof, I need you to do
    • conceptual review (architecture, feature-correctness)
    • detailed review (read every line)
    • test it on preview

Before requesting a review

  • made a self-review
  • added inline comments where things may be not obvious (the "why", not "what")

Before merging

  • tested locally and on preview environment (preview dev login: 5de6)
  • updated test cases document
  • added tests
  • if any new env variables are added, added them to .env.example and the builder/env-check.js if mandatory

@andrasbacsai andrasbacsai self-assigned this Jun 26, 2023
@vercel
Copy link

vercel bot commented Jun 26, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
webstudio-builder ✅ Ready (Inspect) Visit Preview Jun 28, 2023 10:52am

@andrasbacsai andrasbacsai requested review from istarkov and kof and removed request for istarkov June 26, 2023 11:28
@kof kof requested a review from istarkov June 26, 2023 14:07
Copy link
Member

@istarkov istarkov left a comment

Choose a reason for hiding this comment

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

plz reuse same code

apps/builder/app/routes/rest.project.$projectId.tsx Outdated Show resolved Hide resolved
@webstudio-is webstudio-is deleted a comment from istarkov Jun 27, 2023
Copy link
Member

@istarkov istarkov left a comment

Choose a reason for hiding this comment

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

Endpoint name looks strange, we dont return project, plz change

@andrasbacsai andrasbacsai merged commit f849cc5 into main Jun 28, 2023
@andrasbacsai andrasbacsai deleted the load-by-projectId branch June 28, 2023 11:05
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