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

/me endpoint returning invalid links with missing / #2724

Open
adamreisnz opened this issue Jun 23, 2024 · 1 comment
Open

/me endpoint returning invalid links with missing / #2724

adamreisnz opened this issue Jun 23, 2024 · 1 comment

Comments

@adamreisnz
Copy link

adamreisnz commented Jun 23, 2024

Describe the bug
The /me endpoint is returning invalid links with a missing / in their paths.

To Reproduce

  1. Use the API
  2. Make a call to api/v1/me
  3. See malformed links with missing /, example: "/api/v1/mesettings"

Received JSON:

{
  "id": 1234,
  "username": "XXXXXX",
  "ratings": {
    "version": 5,
    "overall": {
      "rating": 1500,
      "deviation": 350,
      "volatility": 0.06
    }
  },
  "ranking": 24.303382182144386,
  "about": "",
  "settings": "/api/v1/mesettings",
  "account_settings": "/api/v1/meaccount_settings",
  "friends": "/api/v1/mefriends",
  "games": "/api/v1/megames",
  "challenges": "/api/v1/mechallenges",
  "groups": "/api/v1/megroups",
  "tournaments": "/api/v1/metournaments",
  "vacation": "/api/v1/mevacation",
  "notifications": "/api/v1/menotifications"
}

Expected behavior
Valid paths with / after /me, e.g. "/api/v1/me/settings"

Expected JSON:

{
  "id": 1234,
  "username": "XXXXXX",
  "ratings": {
    "version": 5,
    "overall": {
      "rating": 1500,
      "deviation": 350,
      "volatility": 0.06
    }
  },
  "ranking": 24.303382182144386,
  "about": "",
  "settings": "/api/v1/me/settings",
  "account_settings": "/api/v1/me/account_settings",
  "friends": "/api/v1/me/friends",
  "games": "/api/v1/me/games",
  "challenges": "/api/v1/me/challenges",
  "groups": "/api/v1/me/groups",
  "tournaments": "/api/v1/me/tournaments",
  "vacation": "/api/v1/me/vacation",
  "notifications": "/api/v1/me/notifications"
}

Desktop (please complete the following information):
n/a

Smartphone (please complete the following information):
n/a

Additional context
This was on beta.online-go.com

@adamreisnz adamreisnz changed the title /me endpoint returning invalid links /me endpoint returning invalid links with missing / Jun 23, 2024
@anoek
Copy link
Member

anoek commented Jun 23, 2024

Whoops

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

No branches or pull requests

2 participants