fix chage duplicate message

This commit is contained in:
peter.maquiran
2025-09-04 15:40:45 +01:00
parent cfc7330e72
commit 430adf394d
54 changed files with 206 additions and 330 deletions
@@ -8,7 +8,7 @@ export const MemberTableSchema = z.object({
wxUserId: z.number(),
wxFullName: z.string(),
wxeMail: z.string(),
userPhoto: z.string().nullable(),
userPhoto: z.string().nullable().optional(),
joinAt: z.string(),
status: z.string().optional(), // useless
isAdmin: z.boolean()
@@ -7,7 +7,7 @@ import { IDBoolean } from "../../../type";
export const RoomTableSchema = z.object({
$id: z.string().optional(),
id: z.string().optional(),
roomName: z.string(),
roomName: z.string().nullable(),
createdBy: z.object({
wxUserId: z.number(),
wxFullName: z.string(),
@@ -26,7 +26,7 @@ export class TokenInterceptor implements HttpInterceptor {
null
);
private excludedDomains = [ 'Login', environment.apiChatUrl, 'http://localhost:8019']; // Add the domains you want to exclude
private excludedDomains = [ 'Login', 'http://localhost:8019']; // Add the domains you want to exclude
constructor(
private http: HttpClient,
@@ -58,7 +58,7 @@ export class TokenInterceptor implements HttpInterceptor {
}
else if (error instanceof HttpErrorResponse && error.status === 401) {
return this.handle401Error(request, next);
} else if (error.url.includes('https://gdapi-dev.dyndns.info/stage/api/v2') && error.status === 0){
} else if (error.url.includes(`${environment.apiURL.slice(0, -1)}`) && error.status === 0){
return this.handle401Error(request, next);
} else {
return throwError(error);
@@ -119,7 +119,7 @@ export class TokenInterceptor implements HttpInterceptor {
}
return this.http
.post<UserLoginOutputResponse>('https://gdapi-dev.dyndns.info/stage/api/v2/Users/RefreshToken', {
.post<UserLoginOutputResponse>(`${environment.apiURL}Users/RefreshToken`, {
authorization: SessionStore.user.Authorization,
refreshToken: SessionStore.user.RefreshToken,
channelId
@@ -7,6 +7,7 @@ import { switchMap } from 'rxjs/operators';
import { err, Result } from 'neverthrow';
import { HubConnection } from '@microsoft/signalr';
import { ISignalRInput, ISignalROutput } from '../type';
import { environment } from 'src/environments/environment';
const { App } = Plugins;
@@ -53,7 +54,7 @@ export class SignalRService {
async establishConnection(): Promise<Result<HubConnection, false>> {
// const connection = new SignalRConnection({url:'https://41e3-41-63-166-54.ngrok-free.app/api/v2/chathub'})
const connection = new SignalRConnection({url:'https://gdapi-dev.dyndns.info/stage/api/v2/chathub'})
const connection = new SignalRConnection({url:`${environment.apiURLStage}chathub`})
const attempConnection = await connection.establishConnection()
if(attempConnection.isOk()) {