EasyRecon/Hunt3r

View on GitHub
frontend/src/app/core/nuclei/nuclei.service.ts

Summary

Maintainability
A
1 hr
Test Coverage
import { Injectable  } from '@angular/core';
import { NucleiResponse,NucleiAddTemplate,NucleiResponseTemplate } from './nuclei';
import { Observable } from 'rxjs';
import {HttpService} from '../../shared/http.service'
@Injectable()
export class NucleiService  {
 
  constructor(private httpService:HttpService)  {
  }

  getTemplate(): Observable<NucleiResponseTemplate> {
    return this.httpService.get<NucleiResponseTemplate>('/nuclei')
  }
  deleteTemplate(name:string): Observable<NucleiResponse> {
    return this.httpService.delete<NucleiResponse>('/nuclei/'+name)
  }
  addTemplate(data:NucleiAddTemplate): Observable<NucleiResponse> {
    return this.httpService.post<NucleiResponse>('/nuclei/',data)
  }
}