Skip to content

fix : AchievementPage API 엔드포인트 수정#59

Merged
IISweetHeartII merged 1 commit intomainfrom
dev
Jan 10, 2026
Merged

fix : AchievementPage API 엔드포인트 수정#59
IISweetHeartII merged 1 commit intomainfrom
dev

Conversation

@IISweetHeartII
Copy link
Contributor

  • /recommendations/{id}/complete → /memories API로 변경
  • 백엔드에 complete API가 없어서 memories API 사용

@IISweetHeartII IISweetHeartII merged commit fbd410f into main Jan 10, 2026
0 of 2 checks passed
@vercel
Copy link

vercel bot commented Jan 10, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
fe4 Building Building Preview, Comment Jan 10, 2026 11:23pm

@gemini-code-assist
Copy link

Summary of Changes

Hello @IISweetHeartII, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

이 PR은 추천 페이지에서 목표 달성 완료 시 호출되는 API 엔드포인트를 수정하여, 백엔드에 존재하지 않는 API를 호출하는 문제를 해결합니다. 기존의 complete API 대신 memories API를 사용하도록 변경하고, 이에 맞춰 요청 데이터 형식을 조정함으로써 기능이 정상적으로 작동하도록 보장합니다.

Highlights

  • API 엔드포인트 변경: 추천 완료 기능을 위한 API 엔드포인트를 /recommendations/{id}/complete에서 /memories로 변경했습니다.
  • 요청 페이로드 조정: 변경될 /memories API의 요구사항에 맞춰 요청 본문에 content 필드와 candyColor: "SPECIAL"을 추가했습니다.
  • 백엔드 API 부재 해결: 기존 complete API가 백엔드에 구현되어 있지 않아, 사용 가능한 memories API를 활용하도록 수정했습니다.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

AchievementPage에서 목표 달성 시 호출하는 API 엔드포인트를 /recommendations/{id}/complete에서 /memories로 수정하고, 이에 맞게 요청 데이터를 변경한 부분을 확인했습니다. 코드의 유지보수성 향상을 위해 한 가지 개선점을 제안합니다.

formData.append("request", JSON.stringify({ memo }));
// POST /memories API 형식에 맞게 request 파라미터 설정
const content = memo || `"${item.content}" 목표 성취 완료!`;
formData.append("request", JSON.stringify({ content, candyColor: "SPECIAL" }));

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

하드코딩된 문자열 "SPECIAL"을 사용하기보다, 상수(constant)로 정의하여 사용하는 것이 좋습니다. 예를 들어 src/constants/candy.ts와 같은 파일에 상수를 정의하고 가져와서 사용하면, 코드의 일관성을 유지하고 오타와 같은 실수를 방지할 수 있습니다. 이는 레포지토리 스타일 가이드의 상수 네이밍 컨벤션과도 일치합니다. 제안된 코드를 적용하려면 SPECIAL_CANDY_COLOR 상수를 적절한 위치에 정의하고 import해야 합니다.

Suggested change
formData.append("request", JSON.stringify({ content, candyColor: "SPECIAL" }));
formData.append("request", JSON.stringify({ content, candyColor: SPECIAL_CANDY_COLOR }));
References
  1. 상수는 UPPER_SNAKE_CASE 표기법을 사용해야 합니다. 예: const API_URL = "..." (link)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant