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

teableio / teable / 8389227144

22 Mar 2024 10:56AM CUT coverage: 26.087% (-53.9%) from 79.937%
8389227144

push

github

web-flow
refactor: move zod schema to openapi (#487)

2100 of 3363 branches covered (62.44%)

282 of 757 new or added lines in 74 files covered. (37.25%)

14879 existing lines in 182 files now uncovered.

25574 of 98035 relevant lines covered (26.09%)

5.17 hits per line

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

28.57
/apps/nestjs-backend/src/features/auth/utils.ts
1
import type { Prisma } from '@teable/db-main-prisma';
1✔
2
import type { IUserMeVo } from '@teable/openapi';
1✔
3
import { pick } from 'lodash';
1✔
4
import { getFullStorageUrl } from '../../utils/full-storage-url';
1✔
5

1✔
6
export const pickUserMe = (
1✔
UNCOV
7
  user: Pick<
×
UNCOV
8
    Prisma.UserGetPayload<null>,
×
UNCOV
9
    'id' | 'name' | 'avatar' | 'phone' | 'email' | 'password' | 'notifyMeta'
×
UNCOV
10
  >
×
UNCOV
11
): IUserMeVo => {
×
UNCOV
12
  return {
×
UNCOV
13
    ...pick(user, 'id', 'name', 'phone', 'email'),
×
UNCOV
14
    notifyMeta: typeof user.notifyMeta === 'object' ? user.notifyMeta : JSON.parse(user.notifyMeta),
×
UNCOV
15
    avatar:
×
UNCOV
16
      user.avatar && !user.avatar?.startsWith('http')
×
UNCOV
17
        ? getFullStorageUrl(user.avatar)
×
UNCOV
18
        : user.avatar,
×
UNCOV
19
    hasPassword: user.password !== null,
×
UNCOV
20
  };
×
UNCOV
21
};
×
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

© 2025 Coveralls, Inc