fix errors

This commit is contained in:
Peter Maquiran
2024-12-06 11:21:32 +01:00
parent 5a1bbe6103
commit aef73625f0
10 changed files with 112 additions and 69 deletions
@@ -26,4 +26,9 @@ export class RemoteNotificationService {
return await this.httpService.patch<NotificationOutputDTO>(`${this.baseUrl}/Notifications/${id}/status`);
}
async notificationDeleteAll(userId: any) {
return await this.httpService.delete<NotificationOutputDTO>(`${this.baseUrl}/Notifications/${userId}`);
}
}
@@ -1,16 +0,0 @@
import { TestBed } from '@angular/core/testing';
import { NotificationRepositoryService } from './notification-repository.service';
describe('NotificationRepositoryService', () => {
let service: NotificationRepositoryService;
beforeEach(() => {
TestBed.configureTestingModule({});
service = TestBed.inject(NotificationRepositoryService);
});
it('should be created', () => {
expect(service).toBeTruthy();
});
});
@@ -0,0 +1,19 @@
import { Injectable } from '@angular/core';
import { INotificationDeleteAllByUserId, NotificationDeleteAllServiceUseCase } from 'src/app/core/notification/use-case/notification-delete-all-use-case.service'
@Injectable({
providedIn: 'root'
})
export class NotificationService {
constructor(
private NotificationDeleteAllServiceUseCase: NotificationDeleteAllServiceUseCase
) { }
deleteAllNotificationByUserId(userId: INotificationDeleteAllByUserId) {
this.NotificationDeleteAllServiceUseCase.execute(userId)
}
}
@@ -0,0 +1,15 @@
import { NgModule } from '@angular/core';
import { HttpModule } from 'src/app/infra/http/http.module';
@NgModule({
imports: [HttpModule],
providers: [],
declarations: [],
schemas: [],
entryComponents: []
})
export class NotificationModule {
constructor() {}
}