import { redirect } from '@sveltejs/kit';
import type { RequestHandler } from './$types';

export const GET: RequestHandler = async ({ url }) => {
	const path = url.pathname.replace(/^\/admin/, '/backoffice') || '/backoffice';
	const search = url.search;
	throw redirect(301, `${path}${search}`);
};
