mirror of
https://github.com/JanGross/quicknotes.git
synced 2025-11-30 23:37:16 +01:00
add basich sharing functionality logic
This commit is contained in:
@@ -16,6 +16,11 @@ class NoteMapper extends Mapper {
|
||||
return $this->findEntity($sql, [$id, $userId]);
|
||||
}
|
||||
|
||||
public function findById($id) {
|
||||
$sql = 'SELECT * FROM *PREFIX*quicknotes_notes WHERE id = ?';
|
||||
return $this->findEntity($sql, [$id]);
|
||||
}
|
||||
|
||||
public function findAll($userId) {
|
||||
$sql = 'SELECT * FROM *PREFIX*quicknotes_notes WHERE user_id = ?';
|
||||
return $this->findEntities($sql, [$userId]);
|
||||
@@ -29,4 +34,4 @@ class NoteMapper extends Mapper {
|
||||
return $row['count'];
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user