Advertisement
Guest User

Untitled

a guest
Jun 25th, 2019
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.04 KB | None | 0 0
  1. import { Injectable } from '@angular/core';
  2. import { HttpClient } from '@angular/common/http';
  3. import { Subject } from 'rxjs';
  4. import { JwtTokenService } from './jwt-token.service';
  5.  
  6. @Injectable({
  7. providedIn: 'root'
  8. })
  9. export class FileService {
  10.  
  11. public refreshAvatar$: Subject<any> = new Subject();
  12. public customerSignature$: Subject<String> = new Subject();
  13. public representativeSignature$: Subject<String> = new Subject();
  14.  
  15. constructor(private http: HttpClient) { }
  16.  
  17. saveAvatar(avatar) {
  18. return this.http.post('/api/file/create', avatar);
  19. }
  20.  
  21. deleteAvatar(avatar) {
  22. return this.http.post('/api/file/delete', avatar);
  23. }
  24.  
  25. requestInvestmentDocument(form) {
  26. return this.http.post('/api/document/create', form);
  27. }
  28.  
  29. getInvestmentDocument(hash) {
  30. return this.http.get('/api/document/' + hash);
  31. }
  32.  
  33. getDashboardDocumets(count: number) {
  34. return this.http.get('/api/document/dashboard/' + count);
  35. }
  36.  
  37. signDocument(form) {
  38. return this.http.post('/api/document/sign', form);
  39. }
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement