@@ -154,7 +154,7 @@ const getKeywordRank = async (
154
154
) : Promise < object > => {
155
155
let keywords : KeywordInfo [ ] = [ ] ;
156
156
let films : FilmInfo [ ] = [ ] ;
157
- let ranks : Array < object > = [ ] ;
157
+ let data : Array < object > = [ ] ;
158
158
try {
159
159
if ( year && month ) {
160
160
//rank2
@@ -166,7 +166,7 @@ const getKeywordRank = async (
166
166
} ) . sort ( { count : - 1 } ) ;
167
167
for ( var i = 0 ; i < 8 ; i ++ ) {
168
168
if ( all_keywords [ i ] ) {
169
- ranks . push ( {
169
+ data . push ( {
170
170
content : all_keywords [ i ] . content ,
171
171
category : all_keywords [ i ] . category ,
172
172
count : all_keywords [ i ] . count ,
@@ -175,10 +175,6 @@ const getKeywordRank = async (
175
175
}
176
176
}
177
177
178
- const data = {
179
- ranks,
180
- } ;
181
-
182
178
return data ;
183
179
} catch ( error ) {
184
180
console . log ( error ) ;
@@ -194,17 +190,14 @@ const getKeywordByCategory = async (
194
190
) : Promise < object > => {
195
191
let keywords : KeywordInfo [ ] = [ ] ;
196
192
let films : FilmInfo [ ] = [ ] ;
197
- let ranks : Array < object > = [ ] ;
193
+ let data : Array < object > = [ ] ;
198
194
try {
199
195
if ( year && month && option ) {
200
196
// rank3
201
197
let images : String [ ] = [ ] ;
202
- ranks = await getCategoryRank ( userId , year , month , option , 8 ) ;
198
+ data = await getCategoryRank ( userId , year , month , option , 8 ) ;
203
199
}
204
200
205
- const data = {
206
- ranks,
207
- } ;
208
201
209
202
return data ;
210
203
} catch ( error ) {
0 commit comments