Skip to content

Commit

Permalink
refactor(server): update some server router path (#1574)
Browse files Browse the repository at this point in the history
  • Loading branch information
BlackHole1 authored Jun 16, 2022
1 parent cd30465 commit c0b836a
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions .commitlintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ module.exports = {
"config",
"flat-rtc",
"pnpm",
"server",
],
],
"scope-case": [2, "always", ["lower-case", "kebab-case"]],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const FLAT_SERVER_LOGIN = {
} as const;

export const FLAT_SERVER_USER_BINDING = {
WECHAT_CALLBACK: `${FLAT_SERVER_VERSIONS.V1}/user/bindingWechat/binding/web`,
WECHAT_CALLBACK: `${FLAT_SERVER_VERSIONS.V1}/user/binding/platform/wechat/web`,
} as const;

export enum RoomType {
Expand Down
4 changes: 2 additions & 2 deletions desktop/renderer-app/src/api-middleware/flatServer/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,7 @@ export type BindingPhoneSendCodeResult = {};

export async function bindingPhoneSendCode(phone: string): Promise<BindingPhoneSendCodeResult> {
return await post<BindingPhoneSendCodePayload, BindingPhoneSendCodeResult>(
"user/bindingPhone/sendMessage",
"user/binding/platform/phone/sendMessage",
{
phone,
},
Expand All @@ -547,7 +547,7 @@ export interface BindingPhonePayload {
export type BindingPhoneResult = {};

export async function bindingPhone(phone: string, code: number): Promise<BindingPhoneResult> {
return await post<BindingPhonePayload, BindingPhoneResult>("user/bindingPhone", {
return await post<BindingPhonePayload, BindingPhoneResult>("user/binding/platform/phone", {
phone,
code,
});
Expand Down
2 changes: 1 addition & 1 deletion web/flat-web/src/api-middleware/flatServer/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const FLAT_SERVER_LOGIN = {
} as const;

export const FLAT_SERVER_USER_BINDING = {
WECHAT_CALLBACK: `${FLAT_SERVER_VERSIONS.V1}/user/bindingWechat/binding/web`,
WECHAT_CALLBACK: `${FLAT_SERVER_VERSIONS.V1}/user/binding/platform/wechat/web`,
} as const;

export enum RoomType {
Expand Down
4 changes: 2 additions & 2 deletions web/flat-web/src/api-middleware/flatServer/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,7 @@ export type BindingPhoneSendCodeResult = {};

export async function bindingPhoneSendCode(phone: string): Promise<BindingPhoneSendCodeResult> {
return await post<BindingPhoneSendCodePayload, BindingPhoneSendCodeResult>(
"user/bindingPhone/sendMessage",
"user/binding/platform/phone/sendMessage ",
{
phone,
},
Expand All @@ -547,7 +547,7 @@ export interface BindingPhonePayload {
export type BindingPhoneResult = {};

export async function bindingPhone(phone: string, code: number): Promise<BindingPhoneResult> {
return await post<BindingPhonePayload, BindingPhoneResult>("user/bindingPhone", {
return await post<BindingPhonePayload, BindingPhoneResult>("user/binding/platform/phone", {
phone,
code,
});
Expand Down

0 comments on commit c0b836a

Please sign in to comment.