mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 13:02:56 +00:00
fix errors
This commit is contained in:
@@ -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() {}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user