fix: default action should fetch new media (#1767)
This commit is contained in:
1 parent
092c050a17
commit
e2b6d38fc2
3 files changed
+3
-3
No files matched your search
@@ -4,6 +4,6 @@ import { FrigateCardAction } from './base';
|
|||||||
|
|
||||||
export class DefaultAction extends FrigateCardAction<GeneralActionConfig> {
|
export class DefaultAction extends FrigateCardAction<GeneralActionConfig> {
|
||||||
public async execute(api: CardActionsAPI): Promise<void> {
|
public async execute(api: CardActionsAPI): Promise<void> {
|
||||||
api.getViewManager().setViewDefault();
|
await api.getViewManager().setViewDefaultWithNewQuery();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -4,7 +4,7 @@ import { FrigateCardAction } from './base';
|
|||||||
|
|
||||||
export class ViewAction extends FrigateCardAction<ViewActionConfig> {
|
export class ViewAction extends FrigateCardAction<ViewActionConfig> {
|
||||||
public async execute(api: CardActionsAPI): Promise<void> {
|
public async execute(api: CardActionsAPI): Promise<void> {
|
||||||
api.getViewManager().setViewByParametersWithNewQuery({
|
await api.getViewManager().setViewByParametersWithNewQuery({
|
||||||
params: {
|
params: {
|
||||||
view: this._action.frigate_card_action,
|
view: this._action.frigate_card_action,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -14,5 +14,5 @@ it('should handle default action', async () => {
|
|||||||
|
|
||||||
await action.execute(api);
|
await action.execute(api);
|
||||||
|
|
||||||
expect(api.getViewManager().setViewDefault).toBeCalled();
|
expect(api.getViewManager().setViewDefaultWithNewQuery).toBeCalled();
|
||||||
});
|
});
|
||||||
Reference in new issue
Block a user