Merge pull request #31 from dvdsk/file-size
Adds file size to pasta with an attachment
This commit is contained in:
commit
9053211904
6 changed files with 32 additions and 23 deletions
|
@ -2,15 +2,21 @@ use std::fmt;
|
|||
|
||||
use chrono::{Datelike, Timelike, Local, TimeZone};
|
||||
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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue