chore: Move to prettier standard double quotes (#1309)
This commit is contained in:
@@ -1,15 +1,15 @@
|
||||
// @flow
|
||||
import invariant from 'invariant';
|
||||
import { action, runInAction } from 'mobx';
|
||||
import { filter } from 'lodash';
|
||||
import { client } from 'utils/ApiClient';
|
||||
import BaseStore from './BaseStore';
|
||||
import RootStore from './RootStore';
|
||||
import GroupMembership from 'models/GroupMembership';
|
||||
import type { PaginationParams } from 'types';
|
||||
import invariant from "invariant";
|
||||
import { action, runInAction } from "mobx";
|
||||
import { filter } from "lodash";
|
||||
import { client } from "utils/ApiClient";
|
||||
import BaseStore from "./BaseStore";
|
||||
import RootStore from "./RootStore";
|
||||
import GroupMembership from "models/GroupMembership";
|
||||
import type { PaginationParams } from "types";
|
||||
|
||||
export default class GroupMembershipsStore extends BaseStore<GroupMembership> {
|
||||
actions = ['create', 'delete'];
|
||||
actions = ["create", "delete"];
|
||||
|
||||
constructor(rootStore: RootStore) {
|
||||
super(rootStore, GroupMembership);
|
||||
@@ -22,7 +22,7 @@ export default class GroupMembershipsStore extends BaseStore<GroupMembership> {
|
||||
try {
|
||||
const res = await client.post(`/groups.memberships`, params);
|
||||
|
||||
invariant(res && res.data, 'Data not available');
|
||||
invariant(res && res.data, "Data not available");
|
||||
|
||||
runInAction(`GroupMembershipsStore#fetchPage`, () => {
|
||||
res.data.users.forEach(this.rootStore.users.add);
|
||||
@@ -37,11 +37,11 @@ export default class GroupMembershipsStore extends BaseStore<GroupMembership> {
|
||||
|
||||
@action
|
||||
async create({ groupId, userId }: { groupId: string, userId: string }) {
|
||||
const res = await client.post('/groups.add_user', {
|
||||
const res = await client.post("/groups.add_user", {
|
||||
id: groupId,
|
||||
userId,
|
||||
});
|
||||
invariant(res && res.data, 'Group Membership data should be available');
|
||||
invariant(res && res.data, "Group Membership data should be available");
|
||||
|
||||
res.data.users.forEach(this.rootStore.users.add);
|
||||
res.data.groups.forEach(this.rootStore.groups.add);
|
||||
@@ -50,11 +50,11 @@ export default class GroupMembershipsStore extends BaseStore<GroupMembership> {
|
||||
|
||||
@action
|
||||
async delete({ groupId, userId }: { groupId: string, userId: string }) {
|
||||
const res = await client.post('/groups.remove_user', {
|
||||
const res = await client.post("/groups.remove_user", {
|
||||
id: groupId,
|
||||
userId,
|
||||
});
|
||||
invariant(res && res.data, 'Group Membership data should be available');
|
||||
invariant(res && res.data, "Group Membership data should be available");
|
||||
|
||||
this.remove(`${userId}-${groupId}`);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user