mirror of
https://github.com/actix/examples
synced 2025-06-28 01:49:02 +02:00
build: nixify
This commit is contained in:
@ -1,11 +1,9 @@
|
||||
use diesel::prelude::*;
|
||||
use diesel_async::{AsyncPgConnection, RunQueryDsl};
|
||||
use uuid::{NoContext, Timestamp, Uuid};
|
||||
|
||||
use crate::models;
|
||||
|
||||
use diesel_async::AsyncPgConnection;
|
||||
use diesel_async::RunQueryDsl;
|
||||
|
||||
type DbError = Box<dyn std::error::Error + Send + Sync>;
|
||||
|
||||
// /// Run query using Diesel to find item by uid and return it.
|
||||
|
@ -1,13 +1,14 @@
|
||||
#[macro_use]
|
||||
extern crate diesel;
|
||||
|
||||
use std::{env, io};
|
||||
|
||||
use actix_web::{error, get, middleware, post, web, App, HttpResponse, HttpServer, Responder};
|
||||
use diesel_async::{
|
||||
pooled_connection::{bb8::Pool, AsyncDieselConnectionManager},
|
||||
AsyncPgConnection,
|
||||
};
|
||||
use dotenvy::dotenv;
|
||||
use std::{env, io};
|
||||
use uuid::Uuid;
|
||||
|
||||
mod actions;
|
||||
|
@ -1,7 +1,8 @@
|
||||
use super::schema::items;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use uuid::Uuid;
|
||||
|
||||
use super::schema::items;
|
||||
|
||||
/// Item details.
|
||||
#[derive(Debug, Clone, Serialize, Deserialize, Queryable, Selectable, Insertable)]
|
||||
#[diesel(table_name = items)]
|
||||
|
Reference in New Issue
Block a user