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

hicommonwealth / commonwealth / 16759460177

05 Aug 2025 07:32PM UTC coverage: 37.938% (-0.06%) from 37.994%
16759460177

Pull #12693

github

web-flow
Merge 0185c7c88 into 083fe776c
Pull Request #12693: Finish backend for Thread Tokens

1861 of 5296 branches covered (35.14%)

Branch coverage included in aggregate %.

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

3330 of 8387 relevant lines covered (39.7%)

34.68 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