src/app/admin/users/users.service.ts
Methods |
constructor(http: AuthHttp)
|
||||||||
Defined in src/app/admin/users/users.service.ts:5
|
||||||||
Parameters :
|
activateUser | ||||||||
activateUser(userId: number)
|
||||||||
Defined in src/app/admin/users/users.service.ts:14
|
||||||||
Parameters :
Returns :
any
|
deactivateUser | ||||||||
deactivateUser(userId: number)
|
||||||||
Defined in src/app/admin/users/users.service.ts:18
|
||||||||
Parameters :
Returns :
any
|
getCompanyUsers |
getCompanyUsers()
|
Defined in src/app/admin/users/users.service.ts:10
|
Returns :
any
|
import {Injectable} from '@angular/core';
import {AuthHttp} from "../../core/auth/auth-http.service";
@Injectable()
export class UsersService {
constructor(private http: AuthHttp) {
}
getCompanyUsers() {
return this.http.get('auth/api/v1/management/users/company/current/members').map(res => res.json())
}
activateUser(userId: number) {
return this.http.post('auth/api/v1/management/users/activate/' + userId, {}).map(rs => rs.json())
}
deactivateUser(userId: number) {
return this.http.post('auth/api/v1/management/users/deactivate/' + userId, {}).map(rs => rs.json())
}
}