Die Tabellen Benutzer, Rollen und Gruppen hinzugefügt
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user