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

runfix: remove slashes from conversation and user api constants #6727

Merged
merged 5 commits into from
Dec 4, 2024

Conversation

V-Gira
Copy link
Contributor

@V-Gira V-Gira commented Dec 3, 2024

Description

Slashes are hardcoded into some of the url constants in the conversation and user api;

This remove those slashes, allowing us to use those constant where the API endpoints change the order around, as is the case for V&, see https://wearezeta.atlassian.net/wiki/spaces/ENGINEERIN/pages/1309868033/API+changes+v6+v7

Checklist

  • mentions the JIRA issue in the PR name (Ex. [WPB-XXXX])
  • PR has been self reviewed by the author;
  • Hard-to-understand areas of the code have been commented;
  • If it is a core feature, unit tests have been added;

@@ -171,7 +171,7 @@ export class UserAPI {
* @see https://staging-nginz-https.zinfra.io/swagger-ui/#!/users/getUserClient
*/
public async getClient(userId: QualifiedId, clientId: string): Promise<PublicClient> {
const url = `${UserAPI.URL.USERS}/${userId.domain}/${userId.id}/${UserAPI.URL.CLIENTS}/${clientId}`;
const url = `//${UserAPI.URL.USERS}/${userId.domain}/${userId.id}/${UserAPI.URL.CLIENTS}/${clientId}`;
Copy link
Contributor

Choose a reason for hiding this comment

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

Double slash?

Copy link
Contributor

Choose a reason for hiding this comment

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

Ohh.. I missed this one :o

@@ -190,7 +190,7 @@ export class UserAPI {
*/
public async getClientPreKey(userId: QualifiedId, clientId: string): Promise<ClientPreKey> {
const {id, domain} = userId;
const url = `${UserAPI.URL.USERS}/${domain}/${id}/${UserAPI.URL.PRE_KEYS}/${clientId}`;
const url = `//${UserAPI.URL.USERS}/${domain}/${id}/${UserAPI.URL.PRE_KEYS}/${clientId}`;
Copy link
Contributor

Choose a reason for hiding this comment

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

Double ?

@@ -206,7 +206,7 @@ export class UserAPI {
* @see https://staging-nginz-https.zinfra.io/swagger-ui/#!/users/getUserClients
*/
public async getClients(userId: QualifiedId): Promise<PublicClient[]> {
const url = `${UserAPI.URL.USERS}/${userId.domain}/${userId.id}/${UserAPI.URL.CLIENTS}`;
const url = `//${UserAPI.URL.USERS}/${userId.domain}/${userId.id}/${UserAPI.URL.CLIENTS}`;
Copy link
Contributor

Choose a reason for hiding this comment

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

Double? :D

@@ -723,7 +723,7 @@ export class UserAPI {
const config: AxiosRequestConfig = {
data: {email},
method: 'put',
url: `${UserAPI.URL.USERS}/${userId}/${UserAPI.URL.EMAIL}`,
url: `//${UserAPI.URL.USERS}/${userId}/${UserAPI.URL.EMAIL}`,
Copy link
Contributor

Choose a reason for hiding this comment

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

Double?

Copy link

sonarqubecloud bot commented Dec 4, 2024

@V-Gira V-Gira merged commit 7dcc269 into main Dec 4, 2024
10 checks passed
@V-Gira V-Gira deleted the v/fix-endpoints branch December 4, 2024 09:20
@paulwire paulwire added the echoes: technical-roadmap Work contributing to the Technical Roadmap, to improve our velocity or reduce the technical debt. label Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
echoes: technical-roadmap Work contributing to the Technical Roadmap, to improve our velocity or reduce the technical debt. type: bug / fix 🐞
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants