Add skeletton for profile page
This commit is contained in:
@@ -16,6 +16,42 @@ export class DataService {
|
||||
private tokenStorage: TokenStorageService
|
||||
) {}
|
||||
|
||||
/**
|
||||
* @returns Observable
|
||||
*/
|
||||
public getUserData(): Observable<any> {
|
||||
return this.http.get(API_URL + 'user', {
|
||||
headers: new HttpHeaders({
|
||||
'Content-Type': 'application/json',
|
||||
Authorization: 'Bearer ' + this.tokenStorage.getToken(),
|
||||
}),
|
||||
responseType: 'text',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} email
|
||||
* @param {string} username
|
||||
* @param {string} password
|
||||
* @returns Observable
|
||||
*/
|
||||
public updateUserData(
|
||||
email: string,
|
||||
username: string,
|
||||
password: string
|
||||
): Observable<any> {
|
||||
return this.http.put(API_URL + 'user', {
|
||||
headers: new HttpHeaders({
|
||||
'Content-Type': 'application/json',
|
||||
Authorization: 'Bearer ' + this.tokenStorage.getToken(),
|
||||
}),
|
||||
responseType: 'text',
|
||||
email,
|
||||
username,
|
||||
password,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns Observable
|
||||
*/
|
||||
@@ -55,6 +91,7 @@ export class DataService {
|
||||
count: BigInt,
|
||||
price: number
|
||||
): Observable<any> {
|
||||
time = time + 'T12:00:00.000';
|
||||
return this.http.post(API_URL + 'transactions', {
|
||||
headers: new HttpHeaders({
|
||||
'Content-Type': 'application/json',
|
||||
|
Reference in New Issue
Block a user