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

hicommonwealth / commonwealth / 16596294465

29 Jul 2025 12:37PM UTC coverage: 39.017% (-0.08%) from 39.099%
16596294465

Pull #12693

github

web-flow
Merge fc4da5236 into c2910e8eb
Pull Request #12693: Finish backend for Thread Tokens

1859 of 5131 branches covered (36.23%)

Branch coverage included in aggregate %.

3 of 83 new or added lines in 8 files covered. (3.61%)

3310 of 8117 relevant lines covered (40.78%)

35.06 hits per line

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

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

7
export function GetThreadToken(): Query<typeof schemas.GetThreadToken> {
NEW
8
  return {
×
9
    ...schemas.GetThreadToken,
10
    auth: [],
11
    secure: false,
12
    body: async ({ payload }) => {
NEW
13
      const { thread_id } = payload;
×
14

NEW
15
      const token = await models.sequelize.query<
×
16
        z.infer<typeof schemas.TokenView>
17
      >(
18
        `
19
      SELECT thread_purchase_token, TT.* from "Communities" C
20
      LEFT JOIN "Threads" T ON T.community_id = C.id
21
      LEFT JOIN "ThreadTokens" TT ON TT.thread_id = T.id
22
      WHERE T.id = :thread_id;
23
      `,
24
        {
25
          replacements: { thread_id },
26
          type: QueryTypes.SELECT,
27
        },
28
      );
29

NEW
30
      return token[0];
×
31
    },
32
  };
33
}
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