Skip to content

Commit

Permalink
Added subtitle services routes
Browse files Browse the repository at this point in the history
  • Loading branch information
SujithThirumalaisamy committed Aug 31, 2024
1 parent 792f153 commit 802ad90
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions src/actions/payoutMethods/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ import { z } from 'zod';
export const payoutMethodSchema = z.object({
upiId: z
.string()
.refine((value) => (/^[0-9A-Za-z._-]{2,256}@[A-Za-z]{2,64}$/).test(value), {
.refine((value) => /^[0-9A-Za-z._-]{2,256}@[A-Za-z]{2,64}$/.test(value), {
message: 'Enter a valid UPI address',
})
.optional(),
solanaAddress: z
.string()
.refine((value) => (/^[A-Za-z0-9]{44}$/).test(value), {
.refine((value) => /^[A-Za-z0-9]{44}$/.test(value), {
message: 'Enter a valid Solana address',
})
.optional(),
Expand All @@ -18,13 +18,13 @@ export const payoutMethodSchema = z.object({
export const upiIdInsertSchema = z.object({
upiId: z
.string()
.refine((value) => (/^[0-9A_Za-z._-]{2,256}@[A_Za-z]{2,64}$/).test(value), {
.refine((value) => /^[0-9A_Za-z._-]{2,256}@[A_Za-z]{2,64}$/.test(value), {
message: 'Invalid UPI address',
}),
});

export const solanaAddressInsertSchema = z.object({
solanaAddress: z.string().refine((value) => (/^[A-Za-z0-9]{44}$/).test(value), {
solanaAddress: z.string().refine((value) => /^[A-Za-z0-9]{44}$/.test(value), {
message: 'Invalid Solana address',
}),
});
Expand Down
6 changes: 3 additions & 3 deletions src/app/api/admin/services/subtitle/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ export async function GET(req: NextRequest) {
include: {
content: {
include: {
courses: true
}
courses: true,
},
},
}
},
});
if (!video)
return NextResponse.json(
Expand Down

0 comments on commit 802ad90

Please sign in to comment.