prettier fix
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
import { NextRequest, NextResponse } from "next/server";
|
||||
import loadEnv from "../handler/load-env";
|
||||
import validateApiKey from "../handler/validate-api-key";
|
||||
import syncAnalysisGroupsStore from "../handler/sync-analysis-groups-store";
|
||||
import { NextRequest, NextResponse } from 'next/server';
|
||||
|
||||
import loadEnv from '../handler/load-env';
|
||||
import syncAnalysisGroupsStore from '../handler/sync-analysis-groups-store';
|
||||
import validateApiKey from '../handler/validate-api-key';
|
||||
|
||||
export const POST = async (request: NextRequest) => {
|
||||
loadEnv();
|
||||
@@ -14,14 +15,20 @@ export const POST = async (request: NextRequest) => {
|
||||
|
||||
try {
|
||||
await syncAnalysisGroupsStore();
|
||||
console.info("Successfully synced analysis groups store");
|
||||
return NextResponse.json({
|
||||
message: 'Successfully synced analysis groups store',
|
||||
}, { status: 200 });
|
||||
console.info('Successfully synced analysis groups store');
|
||||
return NextResponse.json(
|
||||
{
|
||||
message: 'Successfully synced analysis groups store',
|
||||
},
|
||||
{ status: 200 },
|
||||
);
|
||||
} catch (e) {
|
||||
console.error("Error syncing analysis groups store", e);
|
||||
return NextResponse.json({
|
||||
message: 'Failed to sync analysis groups store',
|
||||
}, { status: 500 });
|
||||
console.error('Error syncing analysis groups store', e);
|
||||
return NextResponse.json(
|
||||
{
|
||||
message: 'Failed to sync analysis groups store',
|
||||
},
|
||||
{ status: 500 },
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user