gijol / gijol-backend Goto Github PK
View Code? Open in Web Editor NEWHome Page: https://api.gijol.im
Home Page: https://api.gijol.im
Describe the bug
회원가입시 api/v1/auth/google/sign-up
에 요청을 보낸 뒤 201 created
을 받은 이후 아래와 같이 졸업요건 확인 요청을 보냈습니다.
api/v1/users/me/graduation
엔드포인트에 요청을 보낸 뒤 온 결과는 다음과 같습니다.
결과로는 404 에러
와 아래의 응답이 오게 됩니다.
{
"message" : "확인할 수 없는 학번입니다."
}
혹시 이 에러 다시 확인 가능할까요?
문제 예) 전공이 EECS인데 생명이나 타 전공을 들은 것들이 체킹이 안된다.
List<TakenCourse>
를 만들어 이를 결과로 나타낸다.ControllerAdivce
를 이용해 예외를 처리한다.�entity와 객체의 구분이 명확하지 않아 이를 통일화 혹은 명확하게 구분하는 작업을 진행해야 합니다. 이를 통해 도메인의 책임을 명확하게 분리합니다.
Describe the bug
버그까지 인가 싶긴 한데, 회원가입 요청시 보내는 바디의 studentId의 값의 타입이 integer로 되어 있더라구요.
이전까지는 string으로 사용했는데 의도적으로 바꾼 것인지 여쭤보고 싶습니다!
Describe the bug
구글 로그인 이후 새롭게 발급받은 id 토큰을 이용하여 /api/v1/users/me/graduation
엔드포인트에 요청을 보냈을 때는 정상적으로 응답이 옵니다.
하지만, /api/v1/users/me/taken-courses
엔드포인트의 경우, 다음과 같은 응답 바디가 오게 됩니다.
{
"message" : "해당하는 학점이 없습니다."
}
어떤 문제인지 확인 부탁드리겠습니다!
구글 로그인 이후(silent refresh를 위해 새롭게 access token을 발급받았을 때), 이미 데이터베이스에 정보가 있음에도 불구하고 SIGN_UP
response를 계속 받습니다. 혹시 어떤 경우에 SIGN_UP이 오게되는 것일까요?
자세한 설명은 아래와 같습니다.
위와 같이 구글 로그인 이후 발급받은 구글 토큰을 이용해 유효성을 검사하기 위해 아래의 링크로 요청을 보내면,
구글 토큰 정보 검사 링크 해당 링크 뒤에 액세스 토큰 정보를 넣은 뒤 확인 시,
위와 같이 유효하다는 정보를 얻을 수 있습니다. 하지만, 이 토큰의 정보를 가지고 백엔드에 정보를 요청한 결과,
위와 같이 이미 정보는 업로드 되어있는데도 불구하고 SIGN_UP
이라는 응답을 받게 됩니다.
Describe the bug
/api/v1/courses
라우트로 요청을 보낼 때, size=300
으로 설정하고 보냈더니 중복되는 과목들이 있습니다. 이외에도 사이즈를 바꿔보면서 요청을 보낸 결과, 중복되는 과목들이 있습니다.
To Reproduce
dev.api.gijol.im
의 /api/v1/courses
라우트에서 size를 300으로 설정하고 요청을 보냅니다.일반 생물학실험 (과목 코드 : GS1311)
를 찾아보면, 47번째와 222번째에 중복되어 존재합니다.Expected behavior
고유 강의 명이나 고유 코드가 있어야 합니다. (렌더링 시 key가 중복되는 에러가 발생합니다.)
혹시 저번에 말한 중복해도 보낸다는 이슈라면 이슈 열어두고 두고두고 바꿔보면 좋을 것 같아용 👍
Describe the bug
/api/v1/auth/google/sign-up
엔드포인트에 요청을 보낼 때, 500 에러가 옵니다.
요청 헤더는 다음과 같습니다.
POST /api/v1/auth/google/sign-up HTTP/1.1
Accept: */*
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US,en;q=0.9,ko;q=0.8
Authorization: Bearer [구글 id 토큰]
Cache-Control: no-cache
Connection: keep-alive
Content-Length: 7450
Content-Type: application/json
요청 payload는 다음과 같습니다.
{
"majorType" : "PS",
"studentId": 20205185,
"userTakenCourseList": "유저 taken course list -> S나 F, U 성적 포함 리스트"
}
그리고 에러 메시지는 다음과 같습니다.
{
"error" : "Internal Server Error",
"path" : "/api/v1/auth/google/sign-up",
"status" : 500,
"timestamp" : "2023-05-14T06:31:43.747+00:00"
}
혹시 문제가 있다면 확인 부탁드립니다.
Is your feature request related to a problem? Please describe.
구글 OAuth2에 의존하는 로그인을 가져, 로그인 인가가 필요한 기능에 대한 테스트를 진행하는게 조금 어려운 상황입니다. 이에 대한 테스트 유저를 생성하는 작업을 진행합니다.
Describe the solution you'd like
성적을 제외한 수강 정보를 json 형식으로 받아 이를 파싱해 Fixture를 생성합니다. 이를 이용해 테스트 사용자를 생성해 기능을 테스트해봅니다.
Describe the expected impacts you've considered
기능에 대한 안정감을 통해 더 빠른 속도로 출시할 수 있을 것이라 생각합니다. 또, 추후 리펙토링을 진행하기 위한 밑작업으로 생각됩니다.
**Estimated time **
3h
Describe the bug
/api/v1/users/me/taken-courses
라우트로 요청을 보낼 시, {"message":"해당하는 학점이 없습니다."}
로 400 에러가 납니다.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Additional context
Add any other context about the problem here.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.