Moved tabletop characters to left side of the screen

This commit is contained in:
Thaum Rystra
2024-04-12 17:05:20 +02:00
parent 4793b34a55
commit 08640f2bf2
27 changed files with 496 additions and 1370 deletions

View File

@@ -2,7 +2,6 @@ import SimpleSchema from 'simpl-schema';
import { ValidatedMethod } from 'meteor/mdg:validated-method';
import { RateLimiterMixin } from 'ddp-rate-limiter-mixin';
import Tabletops from '../Tabletops';
import { assertAdmin } from '/imports/api/sharing/sharingPermissions';
import { assertUserHasPaidBenefits } from '/imports/api/users/patreon/tiers';
import { assertUserIsTabletopOwner } from './shared/tabletopPermissions';
import Creatures from '/imports/api/creature/creatures/Creatures';
@@ -14,11 +13,12 @@ const removeTabletop = new ValidatedMethod({
validate: new SimpleSchema({
tabletopId: {
type: String,
regEx: SimpleSchema.RegEx.id,
regEx: SimpleSchema.RegEx.Id,
},
}).validator(),
mixins: [RateLimiterMixin],
// @ts-expect-error Rate limit not defined
rateLimit: {
numRequests: 5,
timeInterval: 5000,
@@ -31,7 +31,6 @@ const removeTabletop = new ValidatedMethod({
}
assertUserHasPaidBenefits(this.userId);
assertUserIsTabletopOwner(tabletopId, this.userId);
assertAdmin(this.userId);
let removed = Tabletops.remove({
_id: tabletopId,