10000 refactor(Paste): remove 'expiryDate' · cAttte/pastebin.js@8a7efdc · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Jul 6, 2025. It is now read-only.

Commit 8a7efdc

Browse files
committed
refactor(Paste): remove 'expiryDate'
1 parent 6b452d3 commit 8a7efdc

File tree

3 files changed

+1
-11
lines changed

3 files changed

+1
-11
lines changed

readme.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -191,11 +191,6 @@ The privacy setting of this paste.
191191
The expiry time of this paste.
192192
**Type: ?[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)**
193193

194-
#### .expiryDate
195-
196-
The expiry date of this paste.
197-
**Type: ?[Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date)**
198-
199194
#### .hits
200195

201196
The number of times anyone saw this paste.

src/struct/Paste.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,6 @@ export default class Paste {
5151
* The expiry time of this paste.
5252
*/
5353
expiry?: Expiry
54-
/**
55-
* The expiry date of this paste.
56-
*/
57-
expiryDate?: Date
5854
/**
5955
* The number of times anyone saw this paste.
6056
*/
@@ -79,7 +75,6 @@ export default class Paste {
7975
this.format = data.format
8076
this.privacy = resolvePrivacy(data.privacy)
8177
this.expiry = resolveExpiry(data.expiry)
82-
this.expiryDate = data.expiryDate
8378
this.hits = data.hits
8479
this.deleted = data.deleted || false
8580
}

src/struct/stores/UserPasteStore.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export default class UserPasteStore extends Map {
6363
title: parsed.paste.paste_title[0],
6464
author: this.user,
6565
size: Number(parsed.paste.paste_size[0]),
66-
expiryDate: new Date(Number(parsed.paste.paste_expire_date[0]) * 1000),
66+
expiry: parsed.paste.paste_expire_date[0] * 1000,
6767
privacy: Number(parsed.paste.paste_private[0]),
6868
format: parsed.paste.paste_format_short[0],
6969
hits: Number(parsed.paste.paste_hits[0])

0 commit comments

Comments
 (0)
0