Skip to content

Commit

Permalink
More styling fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jennymar committed Oct 6, 2024
1 parent afdb442 commit a7ebcbc
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 12 deletions.
8 changes: 4 additions & 4 deletions api/controllers/MerchStoreController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -471,8 +471,8 @@ export class MerchStoreController {
): Promise<GetOrderPickupEventsResponse> {
const pickupEvents = await this.merchOrderService.getPastPickupEvents();
const canSeePickupEventOrders = PermissionsService.canSeePickupEventOrders(user);
const publicPickupEvents = pickupEvents.map((pickupEvent) =>
pickupEvent.getPublicOrderPickupEvent(canSeePickupEventOrders));
const publicPickupEvents = pickupEvents.map((pickupEvent) => pickupEvent
.getPublicOrderPickupEvent(canSeePickupEventOrders));
return { error: null, pickupEvents: publicPickupEvents };
}

Expand All @@ -482,8 +482,8 @@ export class MerchStoreController {
): Promise<GetOrderPickupEventsResponse> {
const pickupEvents = await this.merchOrderService.getFuturePickupEvents();
const canSeePickupEventOrders = PermissionsService.canSeePickupEventOrders(user);
const publicPickupEvents = pickupEvents.map((pickupEvent) =>
pickupEvent.getPublicOrderPickupEvent(canSeePickupEventOrders));
const publicPickupEvents = pickupEvents.map((pickupEvent) => pickupEvent
.getPublicOrderPickupEvent(canSeePickupEventOrders));
return { error: null, pickupEvents: publicPickupEvents };
}

Expand Down
10 changes: 6 additions & 4 deletions services/AttendanceService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,18 @@ export default class AttendanceService {
}

public async getAttendancesForEvent(event: Uuid): Promise<AttendanceModel[]> {
const attendances = await this.transactions.readOnly(async (txn) =>
Repositories.attendance(txn).getAttendancesForEvent(event));
const attendances = await this.transactions.readOnly(async (txn) => Repositories
.attendance(txn)
.getAttendancesForEvent(event));
return attendances;
}

public async getAttendancesForCurrentUser(
user: UserModel,
): Promise<AttendanceModel[]> {
const attendances = await this.transactions.readOnly(async (txn) =>
Repositories.attendance(txn).getAttendancesForUser(user));
const attendances = await this.transactions.readOnly(async (txn) => Repositories
.attendance(txn)
.getAttendancesForUser(user));
return attendances;
}

Expand Down
5 changes: 3 additions & 2 deletions services/MerchStoreService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,9 @@ export default class MerchStoreService {
uuid: Uuid,
canSeeInactiveCollections = false,
): Promise<MerchandiseCollectionModel> {
const collection = await this.transactions.readOnly(async (txn) =>
Repositories.merchStoreCollection(txn).findByUuid(uuid));
const collection = await this.transactions.readOnly(async (txn) => Repositories
.merchStoreCollection(txn)
.findByUuid(uuid));
if (!collection) throw new NotFoundError('Merch collection not found');
if (collection.archived && !canSeeInactiveCollections) throw new ForbiddenError();
collection.collectionPhotos = collection.collectionPhotos.sort(
Expand Down
5 changes: 3 additions & 2 deletions services/UserAccountService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,9 @@ export default class UserAccountService {
public async getCurrentUserActivityStream(
uuid: Uuid,
): Promise<ActivityModel[]> {
const stream = await this.transactions.readOnly(async (txn) =>
Repositories.activity(txn).getCurrentUserActivityStream(uuid));
const stream = await this.transactions.readOnly(async (txn) => Repositories
.activity(txn)
.getCurrentUserActivityStream(uuid));
return stream;
}

Expand Down

0 comments on commit a7ebcbc

Please sign in to comment.