chore: domain can't include classroomio.com
This commit is contained in:
@@ -3,6 +3,7 @@ import {
|
|||||||
getConfigResponse,
|
getConfigResponse,
|
||||||
removeDomainFromVercelProject
|
removeDomainFromVercelProject
|
||||||
} from '$lib/utils/services/org/domain';
|
} from '$lib/utils/services/org/domain';
|
||||||
|
|
||||||
import { json } from '@sveltejs/kit';
|
import { json } from '@sveltejs/kit';
|
||||||
|
|
||||||
export async function POST({ request }) {
|
export async function POST({ request }) {
|
||||||
@@ -13,8 +14,11 @@ export async function POST({ request }) {
|
|||||||
return json({ success: false, message: 'Missing fields' }, { status: 400 });
|
return json({ success: false, message: 'Missing fields' }, { status: 400 });
|
||||||
}
|
}
|
||||||
|
|
||||||
if (params?.domain?.includes('classroomio')) {
|
if (params?.domain?.includes('classroomio.com')) {
|
||||||
return json({ success: false, message: 'Domain cannot contain classroomio' }, { status: 400 });
|
return json(
|
||||||
|
{ success: false, message: 'Domain cannot contain classroomio.com' },
|
||||||
|
{ status: 400 }
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user