MCPcopy Index your code
hub / github.com/DeepNotesApp/DeepNotes / assertUserSubscribed

Function assertUserSubscribed

apps/app-server/src/utils/users.ts:213–220  ·  view source on GitHub ↗
(input: { userId: string })

Source from the content-addressed store, hash-verified

211}
212
213export async function assertUserSubscribed(input: { userId: string }) {
214 if ((await dataAbstraction().hget('user', input.userId, 'plan')) !== 'pro') {
215 throw new TRPCError({
216 code: 'FORBIDDEN',
217 message: 'This action requires a Pro plan subscription.',
218 });
219 }
220}
221
222export async function assertNonDemoAccount(input: { userId: string }) {
223 if (await dataAbstraction().hget('user', input.userId, 'demo')) {

Callers

nothing calls this directly

Calls 1

hgetMethod · 0.45

Tested by

no test coverage detected