Trying to add string dates to javascript Date.

This commit is contained in:
Dessalines 2021-01-23 23:56:26 -05:00
parent fa3178cf5a
commit e294b8bdee
2 changed files with 30 additions and 30 deletions

View file

@ -23,7 +23,7 @@ export interface PostAggregates {
score: number;
upvotes: number;
downvotes: number;
newest_comment_time: string;
newest_comment_time: Date;
}
export interface CommunityAggregates {

View file

@ -7,8 +7,8 @@ export interface UserSafe {
avatar?: string;
admin: boolean;
banned: boolean;
published: string;
updated?: string;
published: Date;
updated?: Date;
matrix_user_id?: string;
actor_id: string;
bio?: string;
@ -25,8 +25,8 @@ export interface UserSafeSettings {
avatar?: string;
admin: boolean;
banned: boolean;
published: string;
updated?: string;
published: Date;
updated?: Date;
show_nsfw: boolean;
theme: string;
default_sort_type: number;
@ -48,8 +48,8 @@ export interface Site {
name: string;
description?: string;
creator_id: number;
published: string;
updated?: string;
published: Date;
updated?: Date;
enable_downvotes: boolean;
open_registration: boolean;
enable_nsfw: boolean;
@ -64,8 +64,8 @@ export interface PrivateMessage {
content: string;
deleted: boolean;
read: boolean;
published: string;
updated?: string;
published: Date;
updated?: Date;
ap_id: string;
local: boolean;
}
@ -80,8 +80,8 @@ export interface PostReport {
reason: string;
resolved: boolean;
resolver_id?: number;
published: string;
updated?: string;
published: Date;
updated?: Date;
}
export interface Post {
@ -93,8 +93,8 @@ export interface Post {
community_id: number;
removed: boolean;
locked: boolean;
published: string;
updated?: string;
published: Date;
updated?: Date;
deleted: boolean;
nsfw: boolean;
stickied: boolean;
@ -110,7 +110,7 @@ export interface PasswordResetRequest {
id: number;
user_id: number;
token_encrypted: string;
published: string;
published: Date;
}
export interface ModRemovePost {
@ -119,7 +119,7 @@ export interface ModRemovePost {
post_id: number;
reason?: string;
removed?: boolean;
when_: string;
when_: Date;
}
export interface ModLockPost {
@ -127,7 +127,7 @@ export interface ModLockPost {
mod_user_id: number;
post_id: number;
locked?: boolean;
when_: string;
when_: Date;
}
export interface ModStickyPost {
@ -135,7 +135,7 @@ export interface ModStickyPost {
mod_user_id: number;
post_id: number;
stickied?: boolean;
when_: string;
when_: Date;
}
export interface ModRemoveComment {
@ -144,7 +144,7 @@ export interface ModRemoveComment {
comment_id: number;
reason?: string;
removed?: boolean;
when_: string;
when_: Date;
}
export interface ModRemoveCommunity {
@ -154,7 +154,7 @@ export interface ModRemoveCommunity {
reason?: string;
removed?: boolean;
expires?: string;
when_: string;
when_: Date;
}
export interface ModBanFromCommunity {
@ -165,7 +165,7 @@ export interface ModBanFromCommunity {
reason?: string;
banned?: boolean;
expires?: string;
when_: string;
when_: Date;
}
export interface ModBan {
@ -175,7 +175,7 @@ export interface ModBan {
reason?: string;
banned?: boolean;
expires?: string;
when_: string;
when_: Date;
}
export interface ModAddCommunity {
@ -184,7 +184,7 @@ export interface ModAddCommunity {
other_user_id: number;
community_id: number;
removed?: boolean;
when_: string;
when_: Date;
}
export interface ModAdd {
@ -192,7 +192,7 @@ export interface ModAdd {
mod_user_id: number;
other_user_id: number;
removed?: boolean;
when_: string;
when_: Date;
}
export interface CommunitySafe {
@ -203,8 +203,8 @@ export interface CommunitySafe {
category_id: number;
creator_id: number;
removed: boolean;
published: string;
updated?: string;
published: Date;
updated?: Date;
deleted: boolean;
nsfw: boolean;
actor_id: string;
@ -221,8 +221,8 @@ export interface CommentReport {
reason: string;
resolved: boolean;
resolver_id?: number;
published: string;
updated?: string;
published: Date;
updated?: Date;
}
export interface Comment {
@ -233,8 +233,8 @@ export interface Comment {
content: string;
removed: boolean;
read: boolean; // Whether the recipient has read the comment or not
published: string;
updated?: string;
published: Date;
updated?: Date;
deleted: boolean;
ap_id: string;
local: boolean;
@ -250,5 +250,5 @@ export interface UserMention {
recipient_id: number;
comment_id: number;
read: boolean;
published: string;
published: Date;
}