@@ -33,9 +33,12 @@ class DynamoDBRepository implements FileRepository {
33
33
ReturnConsumedCapacity : this . isDebugModeEnabled ? 'TOTAL' : 'NONE' ,
34
34
} ) ;
35
35
36
- const result = await this . dynamoDB . send ( command ) ;
36
+ const response = await this . dynamoDB . send ( command ) ;
37
+
38
+ logger . silly ( `${ this . constructor . name } .get.response` , response ) ;
39
+ logger . debug ( `${ this . constructor . name } .get.consumedCapacity` , response . ConsumedCapacity ) ;
37
40
38
- const item = unmarshall ( result . Item ) ;
41
+ const item = unmarshall ( response . Item ) ;
39
42
40
43
return item as LocalFile ;
41
44
}
@@ -47,6 +50,7 @@ class DynamoDBRepository implements FileRepository {
47
50
id : uuidv4 ( ) ,
48
51
thumbnails : [ ] ,
49
52
cacheable : false ,
53
+ typename : 'File' ,
50
54
...params ,
51
55
createdAt : new Date ( ) . toISOString ( ) ,
52
56
}
@@ -60,7 +64,8 @@ class DynamoDBRepository implements FileRepository {
60
64
61
65
const response = await this . dynamoDB . send ( command ) ;
62
66
63
- logger . silly ( `${ this . constructor . name } .create.result` , response ) ;
67
+ logger . silly ( `${ this . constructor . name } .create.response` , response ) ;
68
+ logger . debug ( `${ this . constructor . name } .create.consumedCapacity` , response . ConsumedCapacity ) ;
64
69
65
70
return item as LocalFile ;
66
71
}
@@ -87,7 +92,8 @@ class DynamoDBRepository implements FileRepository {
87
92
88
93
const response = await this . dynamoDB . send ( command ) ;
89
94
90
- logger . silly ( `${ this . constructor . name } .find.result` , response ) ;
95
+ logger . silly ( `${ this . constructor . name } .find.response` , response ) ;
96
+ logger . debug ( `${ this . constructor . name } .find.consumedCapacity` , response . ConsumedCapacity ) ;
91
97
92
98
return response . Responses [ this . tableName ] . map ( item => unmarshall ( item ) ) as LocalFile [ ] ;
93
99
}
@@ -128,6 +134,7 @@ class DynamoDBRepository implements FileRepository {
128
134
const response = await this . dynamoDB . send ( command ) ;
129
135
130
136
logger . silly ( `${ this . constructor . name } .update.response` , response ) ;
137
+ logger . debug ( `${ this . constructor . name } .update.consumedCapacity` , response . ConsumedCapacity ) ;
131
138
132
139
const item = unmarshall ( response . Attributes ) ;
133
140
@@ -169,6 +176,7 @@ class DynamoDBRepository implements FileRepository {
169
176
const response = await this . dynamoDB . send ( command ) ;
170
177
171
178
logger . silly ( `${ this . constructor . name } .delete.response` , response ) ;
179
+ logger . debug ( `${ this . constructor . name } .delete.consumedCapacity` , response . ConsumedCapacity ) ;
172
180
173
181
if ( 'Item' in response === false ) {
174
182
return undefined ;
0 commit comments