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

Door Activities Inquiry Info #12

Open
chelyfern opened this issue Feb 12, 2023 · 1 comment
Open

Door Activities Inquiry Info #12

chelyfern opened this issue Feb 12, 2023 · 1 comment

Comments

@chelyfern
Copy link
Collaborator

chelyfern commented Feb 12, 2023

I implemented the Door Activity Prompt. You can add to the database with a command that looks like the following:
Screen Shot 2023-02-11 at 4 59 35 PM
INSERT INTO "DoorActivities" (title, instruction, has_link, link, has_media, type_of_media, media_url) VALUES ('test', 'testinstr', true, 'linkthis', true, 'photo', 'mediatest');
However, I wasn't able to get the link to work: http://localhost:8000/api/dooractivity—need some help there!
Screen Shot 2023-02-11 at 5 01 02 PM

@tammytru
Copy link
Collaborator

I was running into this problem too but I found out that we were just missing parameters in our url.

In my router file, I had router.get("/:title", promptController.getScreenSaverPrompt), so to access data from the get request. the " :title " is requesting a keyword to search for the your database.
So my url would be:
http://localhost:8000/api/screen-saver-prompt/test [replace 'test' with whatever title you want to look up in your database].

So on that same note, I think if you do http://localhost:8000/api/dooractivity/test, it should return a JSON file with the test data you created above using the INSERT INTO function.

For the post request, I was only able to get it to work through postman but let me know if that fixed your issue.

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

No branches or pull requests

2 participants