Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
projet-cdaw
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Quentin Vrel
projet-cdaw
Commits
457ca2c9
Commit
457ca2c9
authored
Nov 23, 2020
by
quentin.vrel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tp3 modification du PUT
parent
ba9156dc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
README.md
BackEnd/tp3/README.md
+1
-1
UserController.class.php
BackEnd/tp3/controller/UserController.class.php
+2
-1
No files found.
BackEnd/tp3/README.md
View file @
457ca2c9
...
...
@@ -38,4 +38,4 @@ Lorsque des paramètres sont nécessaires au traitement de la requête, ceux-ci
|---|---|---|---|
|Liste et informations des utilisateurs|GET|```
/user
```||
|Informations d'un utilisateur|GET|```
/user/
<id>
```||
|Modification de l'email d'un utilisateur|PUT|```
/user
```
|id, mail|
\ No newline at end of file
|Modification de l'email d'un utilisateur|PUT|```
/user/
<id>
```
|email|
\ No newline at end of file
BackEnd/tp3/controller/UserController.class.php
View file @
457ca2c9
...
...
@@ -20,7 +20,8 @@ class UserController extends Controller {
return
$this
->
getAllUsers
();
break
;
case
'PUT'
:
return
$this
->
updateUser
(
$this
->
request
->
getData
());
if
(
$this
->
request
->
getUriParams
())
return
$this
->
updateUser
(
array_merge
(
$this
->
request
->
getData
(),[
'id'
=>
$this
->
request
->
getUriParams
()[
0
]]));
break
;
}
return
Response
::
errorResponse
(
"unsupported parameters or method in users"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment