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

export const GET: RequestHandler = async ({ params, url }) => {
	const rest = params.path ?? '';
	const target = rest ? `/backoffice/${rest}` : '/backoffice';
	throw redirect(301, `${target}${url.search}`);
};
