code refactoring

This commit is contained in:
Peter Maquiran
2024-08-18 13:27:57 +01:00
parent 650c772084
commit ef12ff439d
50 changed files with 729 additions and 735 deletions
@@ -7,8 +7,9 @@ import { SessionStore } from 'src/app/store/session.service';
import { ThemeService } from 'src/app/services/theme.service';
import { RouteService } from 'src/app/services/route.service';
import { HttpErrorResponse } from '@angular/common/http';
import { RoomRepositoryService } from 'src/app/module/chat/data/repository/room-repository.service'
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service'
import { ChatServiceService } from 'src/app/module/chat/domain/chat-service.service'
@Component({
selector: 'app-new-group',
@@ -50,8 +51,8 @@ export class NewGroupPage implements OnInit{
public ThemeService: ThemeService,
private RouteService: RouteService,
private viewContainerRef: ViewContainerRef,
private roomRepositoryService: RoomRepositoryService,
private httpErrorHandle: HttpErrorHandle,
private ChatServiceService: ChatServiceService
)
{
this.loggedUserChat = SessionStore.user.ChatData['data'];
@@ -119,7 +120,7 @@ export class NewGroupPage implements OnInit{
}
async createGroup1() {
const result = await this.roomRepositoryService.create({
const result = await this.ChatServiceService.createRoom({
roomName: this.groupName,
createdBy: SessionStore.user.UserId,
roomType: 0,