fixes #6 adding the size of the attached file

This commit is contained in:
dvdsk 2022-07-13 23:50:10 +02:00
parent 0687f44137
commit 39233e9447
No known key found for this signature in database
GPG key ID: 6CF9D20C5709A836
6 changed files with 32 additions and 23 deletions

View file

@ -2,15 +2,21 @@ use std::fmt;
use chrono::{DateTime, Datelike, NaiveDateTime, Timelike, Utc};
use serde::{Deserialize, Serialize};
use bytesize::ByteSize;
use crate::util::animalnumbers::to_animal_names;
use crate::util::syntaxhighlighter::html_highlight;
#[derive(Serialize, Deserialize, PartialEq, Eq)]
pub struct PastaFile {
pub name: String, pub size: ByteSize ,
}
#[derive(Serialize, Deserialize)]
pub struct Pasta {
pub id: u64,
pub content: String,
pub file: String,
pub file: Option<PastaFile>,
pub extension: String,
pub private: bool,
pub editable: bool,