mirror of
https://github.com/JanGross/quicknotes.git
synced 2025-12-01 07:37:18 +01:00
Can create the notes with more optional parameters
This commit is contained in:
@@ -96,9 +96,27 @@ class NoteApiController extends ApiController {
|
||||
* @param string $title
|
||||
* @param string $content
|
||||
* @param string $color
|
||||
* @param bool $isPinned
|
||||
* @param array $sharedWith
|
||||
* @param array $tags
|
||||
* @param array $attachments
|
||||
*/
|
||||
public function create(string $title, string $content, string $color = null) {
|
||||
$note = $this->noteService->create($this->userId, $title, $content, $color);
|
||||
public function create(string $title,
|
||||
string $content,
|
||||
string $color = null,
|
||||
bool $isPinned = false,
|
||||
array $sharedWith = [],
|
||||
array $tags = [],
|
||||
array $attachments = [])
|
||||
{
|
||||
$note = $this->noteService->create($this->userId,
|
||||
$title,
|
||||
$content,
|
||||
$color,
|
||||
$isPinned,
|
||||
$sharedWith,
|
||||
$tags,
|
||||
$attachments);
|
||||
|
||||
$etag = md5(json_encode($note));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user