• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

hicommonwealth / commonwealth / 16680327260

01 Aug 2025 04:36PM UTC coverage: 38.352% (-0.02%) from 38.376%
16680327260

push

github

web-flow
Merge pull request #12697 from hicommonwealth/tim/topic-subscriptions

1861 of 5228 branches covered (35.6%)

Branch coverage included in aggregate %.

3 of 27 new or added lines in 8 files covered. (11.11%)

3297 of 8221 relevant lines covered (40.1%)

35.07 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/libs/model/src/aggregates/subscription/GetTopicSubscriptions.query.ts
1
import { type Query } from '@hicommonwealth/core';
2
import * as schemas from '@hicommonwealth/schemas';
3
import { z } from 'zod';
4
import { models } from '../../database';
5

6
export function GetTopicSubscriptions(): Query<
7
  typeof schemas.GetTopicSubscriptions
8
> {
NEW
9
  return {
×
10
    ...schemas.GetTopicSubscriptions,
11
    auth: [],
12
    secure: true,
13
    body: async ({ actor }) => {
NEW
14
      return (
×
15
        await models.TopicSubscription.findAll({
16
          where: { user_id: actor.user.id },
17
          include: [
18
            {
19
              model: models.Topic,
20
              required: true,
21
              attributes: ['id', 'name', 'community_id'],
22
            },
23
          ],
24
        })
NEW
25
      ).map((subscription) => subscription.get({ plain: true })) as z.infer<
×
26
        typeof schemas.GetTopicSubscriptions.output
27
      >;
28
    },
29
  };
30
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc