Skip to content

Commit

Permalink
[FIX] response
Browse files Browse the repository at this point in the history
  • Loading branch information
ssong915 committed Jul 22, 2022
1 parent 827d110 commit 98efd27
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions src/services/MypageService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ const getKeywordRank = async (
): Promise<object> => {
let keywords: KeywordInfo[] = [];
let films: FilmInfo[] = [];
let ranks: Array<object> = [];
let data: Array<object> = [];
try {
if (year && month) {
//rank2
Expand All @@ -166,7 +166,7 @@ const getKeywordRank = async (
}).sort({ count: -1 });
for (var i = 0; i < 8; i++) {
if (all_keywords[i]) {
ranks.push({
data.push({
content: all_keywords[i].content,
category: all_keywords[i].category,
count: all_keywords[i].count,
Expand All @@ -175,10 +175,6 @@ const getKeywordRank = async (
}
}

const data = {
ranks,
};

return data;
} catch (error) {
console.log(error);
Expand All @@ -194,17 +190,14 @@ const getKeywordByCategory = async (
): Promise<object> => {
let keywords: KeywordInfo[] = [];
let films: FilmInfo[] = [];
let ranks: Array<object> = [];
let data: Array<object> = [];
try {
if (year && month && option) {
// rank3
let images: String[] = [];
ranks = await getCategoryRank(userId, year, month, option, 8);
data = await getCategoryRank(userId, year, month, option, 8);
}

const data = {
ranks,
};

return data;
} catch (error) {
Expand Down

0 comments on commit 98efd27

Please sign in to comment.