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

[Backend API] Implement endpoint for list of events #330

Conversation

sikutisa
Copy link
Contributor

@sikutisa sikutisa commented Sep 23, 2024

Resolves: #180

Description

  • 사용자의 이벤트 목록을 가져오는 엔드포인트 구현
  • PlaygroundService.cs 추가
    • GetEvents() 메소드 구현
  • EventRepositorycs 추가
    • GetEvents() 메소드 구현
  • PlaygroundServiceEventRepsitory에 대한 의존성 추가
  • PlaygroundServiceEventRepsitory에 대한 테스트 코드 추가

Discussions

  • 최종적으로 로그인한 유저가 확인 가능한 이벤트들만 리스트로 제공해야 하는데, 현재 Model들만 가지고는 불가능한 사항인 것 같습니다.
    • AdminDetails와 유사하게 EventDetails를 상속하는 UserDetails와 같은 모델을 만들고, 해당 이벤트에 엑세스 가능한 유저 정보를 추가
    • 유저에 대응되는 모델을 추가하고, 해당 모델에 유저가 엑세스 가능한 이벤트들에 대한 정보를 들고 있게 하기
      • 유저에 대한 ID 식별값이 row key로 들어가고, 이벤트들의 ID(이벤트의 row key와 동일한 값)들을 들고 있는다면...?
    • 다른 방법도 논의해보면 좋을 것 같습니다.

@justinyoo
Copy link
Contributor

최종적으로 로그인한 유저가 확인 가능한 이벤트들만 리스트로 제공해야 하는데, 현재 Model들만 가지고는 불가능한 사항인 것 같습니다.

맞습니다. 현재는 사용자 로그인 기능 자체가 없어서 불가능해요. 그래서 현재로서는 그냥 모든 이벤트를 다 들고 오는게 최선이예요. 이부분은 차후에 리팩토링을 거쳐야 합니다.

@sikutisa
Copy link
Contributor Author

sikutisa commented Oct 3, 2024

맞습니다. 현재는 사용자 로그인 기능 자체가 없어서 불가능해요. 그래서 현재로서는 그냥 모든 이벤트를 다 들고 오는게 최선이예요. 이부분은 차후에 리팩토링을 거쳐야 합니다.

말씀하신 것처럼 모든 이벤트 가져오는 방향으로 작업하겠습니다. 그리고 테스트 코드들도 추가했습니다.

@sikutisa
Copy link
Contributor Author

  1. [Backend API] Implement endpoint for list of events #330 (comment) 에서 말씀드린 것 처럼 404 처리가 필요하지 않은 것 같아서 해당 부분 제외했습니다.
  2. 리스트는 Title만 기준으로 정렬하도록 변경했습니다.
  3. github actions 상에서 AzureOpenAIProxy.AppHost.Tests.PlaygroundApp.Pages에 있는 테스트들 중 ~Then_It_Should_Return_HTML_Elements 테스트들이 전부 실패하는데, 확인 중입니다...

Copy link
Contributor

@justinyoo justinyoo left a comment

Choose a reason for hiding this comment

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

고생하셨습니다! LGTM

@justinyoo justinyoo merged commit e702672 into aliencube:main Oct 10, 2024
1 check passed
@sikutisa sikutisa deleted the feature/180-Implement-endpoint-for-list-of-events branch October 10, 2024 11:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Backend API] Implement endpoint for list of events
2 participants