From 37a35d5aab42e07ec527526dfc5dfda3d8f3fce6 Mon Sep 17 00:00:00 2001 From: Oliver Booth Date: Fri, 11 Aug 2023 16:34:10 +0100 Subject: [PATCH] feat: add author id to class --- src/ts/Author.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/ts/Author.ts b/src/ts/Author.ts index 16a98fe..52ae7c4 100644 --- a/src/ts/Author.ts +++ b/src/ts/Author.ts @@ -1,12 +1,18 @@ class Author { + private readonly _id: string; private readonly _name: string; private readonly _avatarHash: string; constructor(json: any) { + this._id = json.id; this._name = json.name; this._avatarHash = json.avatarHash; } + get id(): string { + return this._id; + } + get name(): string { return this._name; } @@ -15,4 +21,5 @@ class Author { return this._avatarHash; } } + export default Author; \ No newline at end of file