Skip to content

Commit de989e5

Browse files
committed
remove rep, rename type
1 parent 5358a71 commit de989e5

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
@@ -72,7 +72,7 @@ import {
7272
SEMATTRS_DAILY_STAFF,
7373
} from '../telemetry';
7474
import { getUnreadNotificationsCount } from '../notifications/common';
75-
import { maxFeedsPerUser, type CoresRole, type Location } from '../types';
75+
import { maxFeedsPerUser, type CoresRole, type TLocation } from '../types';
7676
import { queryReadReplica } from '../common/queryReadReplica';
7777
import { queryDataSource } from '../common/queryDataSource';
7878
import { isPlusMember } from '../paddle';
@@ -146,7 +146,7 @@ export type LoggedInBoot = BaseBoot & {
146146
canSubmitArticle: boolean;
147147
balance: GetBalanceResult;
148148
coresRole: CoresRole;
149-
location?: Location | null;
149+
location?: TLocation | null;
150150
};
151151
accessToken?: AccessToken;
152152
marketingCta: MarketingCta | null;

src/schema/users.ts

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

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

257257
export interface GQLReadingRank {
258258
rankThisWeek?: number;
@@ -679,7 +679,6 @@ export const typeDefs = /* GraphQL */ `
679679
numCommentUpvotes: Int
680680
numFollowers: Int
681681
numFollowing: Int
682-
reputation: Int
683682
}
684683
685684
type ReadingRank {
@@ -1522,7 +1521,7 @@ export const resolvers: IResolvers<unknown, BaseContext> = traceResolvers<
15221521
{ id }: { id: string },
15231522
ctx: Context,
15241523
): Promise<GQLUserStats | null> => {
1525-
const [postStats, commentStats, numFollowing, numFollowers, user] =
1524+
const [postStats, commentStats, numFollowing, numFollowers] =
15261525
await Promise.all([
15271526
getAuthorPostStats(ctx.con, id),
15281527
ctx.con
@@ -1556,10 +1555,6 @@ export const resolvers: IResolvers<unknown, BaseContext> = traceResolvers<
15561555
})
15571556
.andWhere('cp."feedId" = cp."userId"')
15581557
.getCount(),
1559-
ctx.con.getRepository(User).findOne({
1560-
where: { id },
1561-
select: ['reputation'],
1562-
}),
15631558
]);
15641559
return {
15651560
numPosts: postStats?.numPosts ?? 0,
@@ -1569,7 +1564,6 @@ export const resolvers: IResolvers<unknown, BaseContext> = traceResolvers<
15691564
numCommentUpvotes: commentStats?.numCommentUpvotes ?? 0,
15701565
numFollowing,
15711566
numFollowers,
1572-
reputation: user?.reputation,
15731567
};
15741568
},
15751569
user: async (

src/types.ts

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

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

0 commit comments

Comments
 (0)