Skip to main content

handle_get_inquiries

Function handle_get_inquiries 

Source
pub(crate) async fn handle_get_inquiries(
    db: &DatabaseConnection,
    email: &str,
    cors_origin: &str,
) -> Result<Response, Error>
Expand description

GET /inquiries リクエストを処理します

指定されたユーザーメールアドレスに対するすべてのお問い合わせをデータベースから取得します。 結果は作成日時の降順(新しい順)で並べられます。

§Arguments

  • db - SeaORMデータベース接続
  • email - JWTクレームからのユーザーメールアドレス
  • cors_origin - レスポンスヘッダー用のCORSオリジン

§Returns

  • Ok(Response) - お問い合わせ一覧を含むレスポンス(200 OK)
  • Err(Error) - データベースクエリに失敗した場合