Browse Source

web-ui: Add TransactionsService

scalafmt-draft
Alexis Hernandez 7 years ago
parent
commit
9856d2db53
  1. 4
      web-ui/src/app/app.module.ts
  2. 22
      web-ui/src/app/services/transactions.service.ts

4
web-ui/src/app/app.module.ts

@ -14,6 +14,7 @@ import { NgHttpLoaderModule } from 'ng-http-loader/ng-http-loader.module'
import { LanguageService } from './services/language.service';
import { NotificationService } from './services/notification.service';
import { TransactionsService } from './services/transactions.service';
import { AppComponent } from './app.component';
import { HomeComponent } from './components/home/home.component';
@ -50,7 +51,8 @@ import { TransactionFinderComponent } from './components/transaction-finder/tran
],
providers: [
LanguageService,
NotificationService
NotificationService,
TransactionsService
],
bootstrap: [AppComponent]
})

22
web-ui/src/app/services/transactions.service.ts

@ -0,0 +1,22 @@
import { Injectable } from '@angular/core';
import { HttpClient, HttpHeaders } from '@angular/common/http';
import { Observable } from 'rxjs/Observable';
import { environment } from '../../environments/environment';
const httpOptions = {
headers: new HttpHeaders({ 'Content-Type': 'application/json' })
};
@Injectable()
export class TransactionsService {
private baseUrl = environment.api.url + '/transactions';
constructor(private http: HttpClient) { }
verifyEmail(txid: string): Observable<any> {
const url = this.baseUrl + txid;
return this.http.get(url);
}
}
Loading…
Cancel
Save