Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Api: ✨ Spending History Sharing API #233

Merged
merged 30 commits into from
Jan 31, 2025

Conversation

psychology50
Copy link
Member

@psychology50 psychology50 commented Jan 30, 2025

작업 이유

  • Clients can share their spending history in chat rooms they have joined on a given date.

작업 사항

  • Flows:
    1. The server receives a GET request from client.
    2. Aggregate the client's spending history
    3. Publishes an event about sharing the spending history.
    4. The socket server receives the event and then publishes it to chat rooms.
  • Working on the diagram...
    image

image
image

{
  "chatRoomId": 1,
  "chatId": 673027506178529870,
  "content": [
    {
      "isCustom": true,
      "categoryId": 3,
      "name": "피곤하다",
      "icon": "HEALTH",
      "amount": 100000
    },
    {
      "isCustom": true,
      "categoryId": 1,
      "name": "헬로",
      "icon": "LIVING",
      "amount": 81500
    },
    {
      "isCustom": false,
      "categoryId": -1,
      "name": "교통",
      "icon": "TRANSPORTATION",
      "amount": 23000
    },
    {
      "isCustom": false,
      "categoryId": -1,
      "name": "식비",
      "icon": "FOOD",
      "amount": 10500
    },
    {
      "isCustom": false,
      "categoryId": -1,
      "name": "뷰티/패션",
      "icon": "BEAUTY_OR_FASHION",
      "amount": 8000
    }
  ],
  "contentType": "TEXT",
  "categoryType": "SHARE",
  "createdAt": "2025-01-31 13:51:01",
  "senderId": 4
}
  • Sharing messages are sent in an array format, ordered by DESC.
  • The date field is included in the header to maintain the message format.

리뷰어가 중점적으로 확인해야 하는 부분

  • We need to update both the API server and the socket server.

발견한 이슈

  • Wow, I've been using user_id to identify the client from the socket server. 😂😂😂😂

@psychology50 psychology50 added the enhancement New feature or request label Jan 30, 2025
@psychology50 psychology50 self-assigned this Jan 30, 2025
@psychology50 psychology50 merged commit dc8c0c2 into dev Jan 31, 2025
1 check passed
@psychology50 psychology50 deleted the feat/PW-673-share-spending-to-chat branch January 31, 2025 07:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant