fix: actually fixed it

This commit is contained in:
əlemi 2024-03-26 00:58:01 +01:00
parent 3a0ca6af86
commit 6a050c0bb4
Signed by: alemi
GPG key ID: A4895B84D311642C
3 changed files with 4 additions and 4 deletions

View file

@ -1,7 +1,7 @@
use axum::{extract::{Path, Query, State}, http::StatusCode, response::IntoResponse, Json};
use sea_orm::{ColumnTrait, Condition, EntityTrait, IntoActiveModel, Order, QueryFilter, QueryOrder, QuerySelect, SelectColumns, Set};
use crate::{activitypub::{jsonld::LD, JsonLD, Pagination}, activitystream::{object::{activity::{Activity, ActivityMut, ActivityType}, collection::{page::CollectionPageMut, CollectionMut, CollectionType}, Addressed, Object, ObjectMut}, Base, BaseMut, BaseType, Node, ObjectType}, auth::{AuthIdentity, Identity}, model::{self, activity, object}, server::Context, url};
use crate::{activitypub::{jsonld::LD, JsonLD, Pagination}, activitystream::{object::{activity::{Activity, ActivityMut, ActivityType}, collection::{page::CollectionPageMut, CollectionMut, CollectionType}, Addressed}, Base, BaseMut, BaseType, Node, ObjectType}, auth::{AuthIdentity, Identity}, model::{self, activity, object}, server::Context, url};
pub async fn get(
State(ctx): State<Context>,

View file

@ -49,7 +49,7 @@ enum CliCommand {
/// generate fake user, note and activity
Faker{
/// how many fake statuses to insert for root user
count: usize,
count: u64,
},
/// fetch a single AP object
@ -89,7 +89,7 @@ async fn main() {
CliCommand::Migrate => migrations::Migrator::up(&db, None)
.await.expect("error applying migrations"),
CliCommand::Faker => model::faker::faker(&db, args.domain)
CliCommand::Faker { count } => model::faker::faker(&db, args.domain, count)
.await.expect("error creating fake entities"),
CliCommand::Fetch { uri, save } => fetch(&db, &uri, save)

View file

@ -2,7 +2,7 @@ use crate::{activitypub::PUBLIC_TARGET, model::{config, credential}};
use super::{activity, object, user, Audience};
use sea_orm::IntoActiveModel;
pub async fn faker(db: &sea_orm::DatabaseConnection, domain: String, count: usize) -> Result<(), sea_orm::DbErr> {
pub async fn faker(db: &sea_orm::DatabaseConnection, domain: String, count: u64) -> Result<(), sea_orm::DbErr> {
use sea_orm::{EntityTrait, Set};
let root = super::user::Model {