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

Backend: Post new video endpoint #30

Merged
merged 3 commits into from
May 21, 2024
Merged

Conversation

PERicci
Copy link
Owner

@PERicci PERicci commented May 15, 2024

Description

Added a new route in the API to handle POST requests for adding videos. The endpoint '/videos' now accepts a JSON object containing 'title' and 'url' fields in the request body. Upon receiving the request, the endpoint inserts the provided video title and URL into the 'videos' table in the database. The ID for the video is generated automatically by the database, as it is a serial primary key. It then returns a JSON response with the newly added video data including its title and URL, along with a success status code (201)

Issue

Post new video endpoint

Copy link

netlify bot commented May 15, 2024

Deploy Preview for pps-cyf-full-stack ready!

Name Link
🔨 Latest commit 612018c
🔍 Latest deploy log https://app.netlify.com/sites/pps-cyf-full-stack/deploys/6644900df30087000844e714
😎 Deploy Preview https://deploy-preview-30--pps-cyf-full-stack.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@PERicci PERicci mentioned this pull request May 15, 2024
4 tasks
@PERicci PERicci merged commit bec5418 into main May 21, 2024
4 checks passed
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.

1 participant