Skip to content
Snippets Groups Projects
bars.actions.ts 508 B
Newer Older
import { Action } from "@ngrx/store";
import { Bar } from "../../models/bar.model";

export enum BarsActionsTypes {
	FETCH_BARS = '[bars/api] fetch all bars',
	FETCH_BARS_SUCCESS = '[bars/api] fetch bars success'
}

export class FetchBars implements Action {
	readonly type = BarsActionsTypes.FETCH_BARS;
}

export class FetchBarsSuccess implements Action {
	readonly type = BarsActionsTypes.FETCH_BARS_SUCCESS;
	constructor(public payload: Bar[]) {}
}

export type BarsAction = FetchBars | FetchBarsSuccess;