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

Us2 admin projects #32

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Us2 admin projects #32

wants to merge 4 commits into from

Conversation

Yunwei-Zhang
Copy link
Collaborator

What is this change doing?

finish fetching data from projects, projects-allocations

Why is it needed?

main function of US2

Where should the reviewer start?

just start by opening in broswer

How can these changes be manually tested?

just review the code

What user story does this PR relate to? (include link)

US2

Screenshots (if applicable)

image

mostly done, but still have two problems in admin/projects and admin/editprojects, like when when using 'method: 'PUT'' and 'method: 'DELETE'', this may not fetch data successful, here is:

image

I dont know how to fix it, the rest is all OK.

has done part of it, but method: PUT and method: DELETE still not working, and tried but do not find out the problems
@Yunwei-Zhang Yunwei-Zhang added the bug Something isn't working label May 18, 2021
headers: { 'Content-Type': 'application/json',
'Accept': 'application/json',
'Access-Control-Allow-Origin': "*",
'Access-Control-Allow-Methods': "PUT"},
Copy link
Owner

Choose a reason for hiding this comment

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

This backend route does not exist, you currently cannot update a project via the front end

@@ -30,7 +30,7 @@ class UrlSet extends Component{
<Route path="/student/projects/:project_id/groups/:group_id" exact strict component={StudentGroup}/>
<Route path="/admin/home" exact strict component={AdminMainMenu}/>
<Route path="/admin/notifications" exact strict component={AdminNotification}/>
<Route path="/admin/projects/new" exact strict component={AdminCreateProject}/>
<Route path="/admin/projects/create/new" exact strict component={AdminCreateProject}/>
Copy link
Owner

Choose a reason for hiding this comment

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

this is not a restful route https://restfulapi.net/resource-naming/

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I know, but the question is that since we set the project route : /admin/projects/:project_id
the previous route: /admin/projects/new many make project_id = new, which may cause problems.
So how to fix it?

@Yunwei-Zhang Yunwei-Zhang removed the bug Something isn't working label May 18, 2021
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