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
7e63ff50
Commit
7e63ff50
authored
Nov 25, 2020
by
Zohten
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
created response
parent
c09958b2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletion
+6
-1
Response.class.php
BackEnd/src/classes/Response.class.php
+5
-0
UserController.class.php
BackEnd/src/controller/UserController.class.php
+1
-1
No files found.
BackEnd/src/classes/Response.class.php
View file @
7e63ff50
...
...
@@ -25,6 +25,11 @@ class Response
return
new
Response
(
200
,
$message
);
}
public
static
function
createdResponse
(
$message
=
""
)
{
return
new
Response
(
201
,
$message
);
}
public
static
function
notFoundResponse
(
$message
=
""
)
{
return
new
Response
(
404
,
$message
);
...
...
BackEnd/src/controller/UserController.class.php
View file @
7e63ff50
...
...
@@ -106,7 +106,7 @@ class UserController extends Controller
{
User
::
addRow
(
$array
);
$message
=
json_encode
([
"message"
=>
'User succesfully added!'
]);
$response
=
Response
::
ok
Response
(
$message
);
$response
=
Response
::
created
Response
(
$message
);
return
$response
;
}
...
...
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