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

Commit 8ad6f66

Browse files
committed
refactor(User, Paste): create & implement _apply()
1 parent 47b8935 commit 8ad6f66

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/struct/Paste.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@ export default class Paste {
6666
*/
6767
constructor(client: PastebinClient, data: any) {
6868
this.client = client
69+
this._apply(data)
70+
}
71+
72+
_apply(data: any) {
6973
this.key = data.key
7074
this.title = data.title
7175
this.author = data.author

src/struct/User.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ export default class User {
1919
*/
2020
constructor(client: PastebinClient, data: any) {
2121
this.client = client
22+
this._apply(data)
23+
}
24+
25+
_apply(data: any) {
2226
this.username = data.username
2327
}
2428

0 commit comments

Comments
 (0)