mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
code refactoring
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user