mirror of
https://github.com/JanGross/quicknotes.git
synced 2025-11-30 23:37:16 +01:00
Smal misc fixes...
This commit is contained in:
@@ -74,7 +74,7 @@ class NoteApiController extends ApiController {
|
||||
*
|
||||
* @param int $id
|
||||
*/
|
||||
public function show($id): JSONResponse {
|
||||
public function show(int $id): JSONResponse {
|
||||
$note = $this->noteService->get($this->userId, $id);
|
||||
if (is_null($note)) {
|
||||
return new JSONResponse([], Http::STATUS_NOT_FOUND);
|
||||
@@ -97,7 +97,7 @@ class NoteApiController extends ApiController {
|
||||
* @param string $content
|
||||
* @param string $color
|
||||
*/
|
||||
public function create($title, $content, $color = "#F7EB96") {
|
||||
public function create(string $title, string $content, string $color = null) {
|
||||
$note = $this->noteService->create($this->userId, $title, $content, $color);
|
||||
|
||||
$etag = md5(json_encode($note));
|
||||
|
||||
@@ -70,7 +70,7 @@ class NoteController extends Controller {
|
||||
*
|
||||
* @param int $id
|
||||
*/
|
||||
public function show($id): JSONResponse {
|
||||
public function show(int $id): JSONResponse {
|
||||
$note = $this->noteService->get($this->userId, $id);
|
||||
if (is_null($note)) {
|
||||
return new JSONResponse([], Http::STATUS_NOT_FOUND);
|
||||
@@ -91,7 +91,7 @@ class NoteController extends Controller {
|
||||
* @param string $content
|
||||
* @param string $color
|
||||
*/
|
||||
public function create($title, $content, $color = NULL) {
|
||||
public function create(string $title, string $content, string $color = null) {
|
||||
$note = $this->noteService->create($this->userId, $title, $content, $color);
|
||||
|
||||
$etag = md5(json_encode($note));
|
||||
@@ -137,4 +137,5 @@ class NoteController extends Controller {
|
||||
$this->noteService->destroy($this->userId, $id);
|
||||
return new JSONResponse([]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user