Skip to content

Commit 05f1693

Browse files
committed
remove rep, rename type
1 parent 9803782 commit 05f1693

File tree

3 files changed

+5
-11
lines changed

3 files changed

+5
-11
lines changed

src/routes/boot.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ import {
7373
SEMATTRS_DAILY_STAFF,
7474
} from '../telemetry';
7575
import { getUnreadNotificationsCount } from '../notifications/common';
76-
import { maxFeedsPerUser, type CoresRole, type Location } from '../types';
76+
import { maxFeedsPerUser, type CoresRole, type TLocation } from '../types';
7777
import { queryReadReplica } from '../common/queryReadReplica';
7878
import { queryDataSource } from '../common/queryDataSource';
7979
import { isPlusMember } from '../paddle';
@@ -147,7 +147,7 @@ export type LoggedInBoot = BaseBoot & {
147147
canSubmitArticle: boolean;
148148
balance: GetBalanceResult;
149149
coresRole: CoresRole;
150-
location?: Location | null;
150+
location?: TLocation | null;
151151
};
152152
accessToken?: AccessToken;
153153
marketingCta: MarketingCta | null;

src/schema/users.ts

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ type FollowStats = { numFollowing: number; numFollowers: number };
250250

251251
export type GQLUserStats = Omit<PostStats, 'numPostComments'> &
252252
CommentStats &
253-
FollowStats & { reputation?: number };
253+
FollowStats;
254254

255255
export interface GQLReadingRank {
256256
rankThisWeek?: number;
@@ -669,7 +669,6 @@ export const typeDefs = /* GraphQL */ `
669669
numCommentUpvotes: Int
670670
numFollowers: Int
671671
numFollowing: Int
672-
reputation: Int
673672
}
674673
675674
type ReadingRank {
@@ -1513,7 +1512,7 @@ export const resolvers: IResolvers<unknown, BaseContext> = traceResolvers<
15131512
{ id }: { id: string },
15141513
ctx: Context,
15151514
): Promise<GQLUserStats | null> => {
1516-
const [postStats, commentStats, numFollowing, numFollowers, user] =
1515+
const [postStats, commentStats, numFollowing, numFollowers] =
15171516
await Promise.all([
15181517
getAuthorPostStats(ctx.con, id),
15191518
ctx.con
@@ -1547,10 +1546,6 @@ export const resolvers: IResolvers<unknown, BaseContext> = traceResolvers<
15471546
})
15481547
.andWhere('cp."feedId" = cp."userId"')
15491548
.getCount(),
1550-
ctx.con.getRepository(User).findOne({
1551-
where: { id },
1552-
select: ['reputation'],
1553-
}),
15541549
]);
15551550
return {
15561551
numPosts: postStats?.numPosts ?? 0,
@@ -1560,7 +1555,6 @@ export const resolvers: IResolvers<unknown, BaseContext> = traceResolvers<
15601555
numCommentUpvotes: commentStats?.numCommentUpvotes ?? 0,
15611556
numFollowing,
15621557
numFollowers,
1563-
reputation: user?.reputation,
15641558
};
15651559
},
15661560
user: async (

src/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ export type ServiceClient<T extends ServiceType> = {
305305
garmr: GarmrService;
306306
};
307307

308-
export type Location = {
308+
export type TLocation = {
309309
id: string;
310310
country: string;
311311
subdivision: string | null;

0 commit comments

Comments
 (0)