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

hicommonwealth / commonwealth / 16654489606

31 Jul 2025 04:23PM UTC coverage: 38.356% (-0.8%) from 39.148%
16654489606

Pull #12697

github

web-flow
Merge bcbe9f130 into febfac2fb
Pull Request #12697: Topic Subscriptions

1861 of 5228 branches covered (35.6%)

Branch coverage included in aggregate %.

2 of 13 new or added lines in 7 files covered. (15.38%)

107 existing lines in 6 files now uncovered.

3296 of 8217 relevant lines covered (40.11%)

35.08 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