@@ -2,12 +2,12 @@ use serde::{Deserialize, Serialize};
|
||||
use sqlx::{FromRow, SqlitePool};
|
||||
|
||||
#[derive(FromRow, Debug, Serialize, Deserialize, Clone)]
|
||||
pub struct LogType{
|
||||
pub struct LogType {
|
||||
pub id: i64,
|
||||
name: String,
|
||||
}
|
||||
|
||||
impl LogType{
|
||||
impl LogType {
|
||||
pub async fn find_by_id(db: &SqlitePool, id: i64) -> Option<Self> {
|
||||
sqlx::query_as!(
|
||||
Self,
|
||||
@@ -45,7 +45,7 @@ mod test {
|
||||
|
||||
#[sqlx::test]
|
||||
fn test_find_true() {
|
||||
let pool = testdb!();
|
||||
let _ = testdb!();
|
||||
}
|
||||
|
||||
//TODO: write tests
|
||||
|
Reference in New Issue
Block a user