Add a route to get a single inbox entry

This commit is contained in:
2025-05-08 16:47:32 +02:00
parent df7f395e8b
commit b6af889dc5
6 changed files with 87 additions and 5 deletions

View File

@ -5,7 +5,7 @@ use crate::schema::*;
use diesel::{Insertable, Queryable};
#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq)]
pub struct InboxID(pub i32);
pub struct InboxEntryID(pub i32);
/// Single inbox entry information
#[derive(Queryable, Debug, Clone, serde::Serialize, serde::Deserialize)]
@ -32,8 +32,8 @@ pub struct InboxEntry {
impl InboxEntry {
/// Get the ID of the inbox entry
pub fn id(&self) -> InboxID {
InboxID(self.id)
pub fn id(&self) -> InboxEntryID {
InboxEntryID(self.id)
}
/// The id of the user owning this inbox entry