We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7600fb4 commit cb6c5dbCopy full SHA for cb6c5db
1 file changed
src/cosmos-db/documents/token/nft-details.doc.ts
@@ -57,6 +57,11 @@ export class NftMedia {
57
class NftStats {
58
@ApiProperty({ type: 'integer', required: false })
59
likedCount?: number;
60
+
61
+ constructor(props?: Partial<NftStats>) {
62
+ Object.assign(this, props);
63
+ this.likedCount = props?.likedCount ?? 0;
64
+ }
65
}
66
67
class NftDocBase {
@@ -165,7 +170,7 @@ class NftDocBase {
165
170
required: false,
166
171
description: 'The statistics of the NFT',
167
172
})
168
- statistics?: NftStats;
173
+ statistics?: NftStats = new NftStats();
169
174
@ApiProperty({
175
type: Boolean,
176
0 commit comments