diff options
Diffstat (limited to 'src/db/models/folder.rs')
-rw-r--r-- | src/db/models/folder.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/db/models/folder.rs b/src/db/models/folder.rs index 5370c9dd..45460720 100644 --- a/src/db/models/folder.rs +++ b/src/db/models/folder.rs @@ -120,10 +120,11 @@ impl Folder { Ok(()) } - pub async fn find_by_uuid(uuid: &str, conn: &mut DbConn) -> Option<Self> { + pub async fn find_by_uuid_and_user(uuid: &str, user_uuid: &str, conn: &mut DbConn) -> Option<Self> { db_run! { conn: { folders::table .filter(folders::uuid.eq(uuid)) + .filter(folders::user_uuid.eq(user_uuid)) .first::<FolderDb>(conn) .ok() .from_db() |