-
Notifications
You must be signed in to change notification settings - Fork 30
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
Xiao F Create way for owner to edit & update ChatGPT prompt text #603
Xiao F Create way for owner to edit & update ChatGPT prompt text #603
Conversation
…pdate-ChatGPT-prompt-text
Hi @this-journey, from the error it gave, it looks like you are passing an argument to GET request. Sorry, I cannot reproduce the error. I tested the GET endpoint and it works for me. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As per my video, it doesn't seem like the message is being saved.
pr.review.603.mp4
Hi @Alforoan, as in your video, you are using GET for updating the prompt, you should use PUT instead. |
Hi @Alforoan, as in your screenshot, you are using GET for updating the prompt, you should use PUT instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's working as intended. My previous comment was due to my own error. I also left a comment on pr#1510. Nice!
2023-12-01.10-23-04.mp4
I used my owner account to test both the GET request and PUT request. It appears that the GET request is working as intended however the PUT request appears to be only partially working it returns the success message but it doesn't update the text. Please see the video below for more info: 2023-12-02.10-28-56.mov |
Tested with FE PR 1510. The codes work as expected. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @tsunami776, I have used the Postman to test the GET and PUT for Aiprompt, and all the function works well.
(1) For the GET request, after pasting the token from the application, it can request the response as intended and the result is correct.
(2) For the PUT request, after sending the put request, it showed the "successfully saved AI prompt".
Two images for reference.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested the PR and the comment left on the FrontEnd #1510
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See my comment on the FE pr.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested the PR and the comment left on the FrontEnd 1510 |
…pdate-ChatGPT-prompt-text
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested this PR and its FE PR and it works as described. I am able to update and save the prompt when logged in as owner.
See my comments for FE PR.
Thank you all, merging! |
Description
Related PRS (if any):
This back-end PR is related to the #1510 front-end PR.
Main changes explained:
src/models/dashBoardData.js
for prompt text schemaHow to test:
npm run build
andnpm start
to start the BE{ "aIPromptText": "Updated prompt" }
-> Send PUT request -> Check if 'Successfully saved AI prompt.' is returned and use GET to check if prompt is changedScreenshots or videos of changes:
Get.Update.Prompt.Test.mp4
Note:
N/A