Rename db to util and use OffsetDateTime with sqlx

This commit is contained in:
Joscha 2023-08-06 17:38:49 +02:00
parent 6fcd073738
commit 553a56bb12
7 changed files with 46 additions and 28 deletions

View file

@ -3,7 +3,7 @@ use axum::{extract::State, response::IntoResponse};
use futures::TryStreamExt;
use sqlx::SqlitePool;
use crate::{config::Config, db, somehow};
use crate::{config::Config, somehow, util};
struct Ref {
name: String,
@ -36,7 +36,7 @@ pub async fn get(
.fetch(&db)
.map_ok(|r| Ref {
name: r.name,
short: db::format_commit_short(&r.hash, &r.message),
short: util::format_commit_short(&r.hash, &r.message),
hash: r.hash,
tracked: r.tracked != 0,
})