import {Injectable} from '@angular/core';
import {ResourceBase} from '../../../../core/api/resource';
import {HttpClient} from '@angular/common/http';
import {Observable} from 'rxjs';
import {catchError} from 'rxjs/operators';

@Injectable({
	providedIn: 'root'
})
export class RolesService extends ResourceBase {

	constructor(public http: HttpClient) {
		super(http, 'administrador/roles');
	}

	public getPermisos(): Observable<any>{
		return this.http.get(this.baseUrl + 'administrador/roles/rutas').pipe(
			catchError(this.handleError('index'))
		);
	}
}
