chore: Remove RPCAction.Count as default valid action on frontend (Only available for users)
This commit is contained in:
@@ -3,16 +3,9 @@ import orderBy from "lodash/orderBy";
|
||||
import { action, computed } from "mobx";
|
||||
import Comment from "~/models/Comment";
|
||||
import RootStore from "./RootStore";
|
||||
import Store, { RPCAction } from "./base/Store";
|
||||
import Store from "./base/Store";
|
||||
|
||||
export default class CommentsStore extends Store<Comment> {
|
||||
actions = [
|
||||
RPCAction.List,
|
||||
RPCAction.Create,
|
||||
RPCAction.Update,
|
||||
RPCAction.Delete,
|
||||
];
|
||||
|
||||
constructor(rootStore: RootStore) {
|
||||
super(rootStore, Comment);
|
||||
}
|
||||
|
||||
@@ -6,9 +6,18 @@ import { type JSONObject, UserRole } from "@shared/types";
|
||||
import User from "~/models/User";
|
||||
import { client } from "~/utils/ApiClient";
|
||||
import RootStore from "./RootStore";
|
||||
import Store from "./base/Store";
|
||||
import Store, { RPCAction } from "./base/Store";
|
||||
|
||||
export default class UsersStore extends Store<User> {
|
||||
actions = [
|
||||
RPCAction.Info,
|
||||
RPCAction.List,
|
||||
RPCAction.Create,
|
||||
RPCAction.Update,
|
||||
RPCAction.Delete,
|
||||
RPCAction.Count,
|
||||
];
|
||||
|
||||
@observable
|
||||
counts: {
|
||||
active: number;
|
||||
|
||||
@@ -1,16 +1,9 @@
|
||||
import { computed } from "mobx";
|
||||
import WebhookSubscription from "~/models/WebhookSubscription";
|
||||
import RootStore from "./RootStore";
|
||||
import Store, { RPCAction } from "./base/Store";
|
||||
import Store from "./base/Store";
|
||||
|
||||
export default class WebhookSubscriptionsStore extends Store<WebhookSubscription> {
|
||||
actions = [
|
||||
RPCAction.List,
|
||||
RPCAction.Create,
|
||||
RPCAction.Delete,
|
||||
RPCAction.Update,
|
||||
];
|
||||
|
||||
constructor(rootStore: RootStore) {
|
||||
super(rootStore, WebhookSubscription);
|
||||
}
|
||||
|
||||
@@ -54,7 +54,6 @@ export default abstract class Store<T extends Model> {
|
||||
RPCAction.Create,
|
||||
RPCAction.Update,
|
||||
RPCAction.Delete,
|
||||
RPCAction.Count,
|
||||
];
|
||||
|
||||
constructor(rootStore: RootStore, model: typeof Model) {
|
||||
|
||||
Reference in New Issue
Block a user