Die Tabellen Benutzer, Rollen und Gruppen hinzugefügt

This commit is contained in:
Peter Schiwy
2024-11-29 10:35:10 +01:00
parent a290bcceb3
commit fdc57ab13a
48 changed files with 771 additions and 267 deletions

View File

@@ -1,7 +1,7 @@
use async_graphql::{Context, FieldResult, Object};
use sqlx::postgres::PgPool;
use crate::models::typ::Typ;
use crate::{models::typ::Typ, scalar::Id};
#[derive(Default)]
pub struct TypQuery {}
@@ -14,7 +14,7 @@ impl TypQuery {
Ok(rows)
}
async fn typ<'a>(&self, ctx: &'a Context<'_>, id: i32) -> FieldResult<Typ> {
async fn typ<'a>(&self, ctx: &'a Context<'_>, id: Id) -> FieldResult<Typ> {
let pool = ctx.data::<PgPool>()?;
let row = Typ::read_one(pool, &id).await?;
Ok(row)