Merge "Audit log,resolved merge conflict"
[portal.git] / portal-FE-common / src / app / shared / services / auditLog / audit-log.service.ts
diff --git a/portal-FE-common/src/app/shared/services/auditLog/audit-log.service.ts b/portal-FE-common/src/app/shared/services/auditLog/audit-log.service.ts
new file mode 100644 (file)
index 0000000..0504fb9
--- /dev/null
@@ -0,0 +1,23 @@
+import { Injectable } from '@angular/core';
+import { Observable } from 'rxjs';
+import { environment } from 'src/environments/environment';
+import { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http';
+
+@Injectable({
+  providedIn: 'root'
+})
+export class AuditLogService {
+
+  constructor(private api: HttpClient) { }
+
+  storeAudit(affectedAppId:any,type:any,comment:any): Observable<any> {
+    var url = environment.api.storeAuditLog+'?affectedAppId=' + affectedAppId;
+               if(type!=''){
+                       url= url+'&type='+type;
+               }
+               if(comment!=''){
+                       url= url+'&comment='+comment;
+               }
+    return this.api.get(url);
+  }
+}