klesh opened a new pull request, #7357:
URL: https://github.com/apache/incubator-devlake/pull/7357

   ### Summary
   
   Apache DevLake does not support special characters in Project names 
properly, lets solve it once and for all.
   
   The solution is simple: Whenever calling an API with `projectName` in the 
`path`, i.e. `GET /projects/:projectName`, it must be `encodeURIComponent`.
   
   There are 4 API endpoints:
   ```
        r.GET("/projects/:projectName", project.GetProject)
        r.GET("/projects/:projectName/check", project.GetProjectCheck)
        r.PATCH("/projects/:projectName", project.PatchProject)
        r.DELETE("/projects/:projectName", project.DeleteProject)
   ```
   
   
   ### Does this close any open issues?
   BE Part for #7217
   
   ### Screenshots
   
   The `get detail` API
   ```
   curl http://localhost:4000/api/projects/hello%20%2F%20world
   {"name":"hello / 
world","description":"","createdAt":"2024-04-22T14:42:51.814+08:00","updatedAt":"2024-04-22T14:42:51.814+08:00","_raw_data_params":"","_raw_data_table":"","_raw_data_id":0,"_raw_data_remark":"","metrics":null,"blueprint":null}
   ```
   
   The `check existing` API
   ```
   curl http://localhost:4000/api/projects/hello%20%2F%20world/check
   {"exist":true}
   ```
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to