Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import { Injectable } from '@angular/core';
- import { HttpClient, HttpHeaders } from '@angular/common/http';
- import { Observable } from 'rxjs/Observable';
- import { APP_CONSTANTS } from '../app.constants';
- import 'rxjs/add/operator/map';
- @Injectable()
- export class UserEventService {
- constructor(private http: HttpClient) { }
- attend(location: string,
- name: string,
- description: string,
- imageUrl: string,
- eventType: string,
- startTime: string,
- endTime: string) {
- const currentUser = JSON.parse(localStorage.getItem('currentUser'));
- const userEmail = currentUser.username;
- return this.http.post<any>(`${APP_CONSTANTS.USEREVENTS}/api/userslist/email/`+ userEmail, {userEmail: userEmail,
- location: location,
- name: name,
- description: description,
- imageUrl: imageUrl,
- eventType: eventType,
- startTime: startTime,
- endTime: endTime });
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement