mirror of
https://github.com/LogicLabs-OU/OpenArchiver.git
synced 2026-04-06 00:31:57 +02:00
Format checked, contributing.md update (#49)
Co-authored-by: Wayne <5291640+ringoinca@users.noreply.github.com>
This commit is contained in:
@@ -51,3 +51,13 @@ This project and everyone participating in it is governed by the [Open Archiver
|
||||
- Follow the existing code style.
|
||||
- Use TypeScript's strict mode.
|
||||
- Avoid using `any` as a type. Define clear interfaces and types in the `packages/types` directory.
|
||||
|
||||
### Formatting
|
||||
|
||||
We use Prettier for code formatting. Before you commit new code, it is necessary to check code format by running this command from the root folder:
|
||||
|
||||
`pnpm run lint`
|
||||
|
||||
If there are any format issues, you can use the following command to fix them
|
||||
|
||||
`pnpm run format`
|
||||
|
||||
@@ -33,13 +33,10 @@ export class IngestionController {
|
||||
} catch (error: any) {
|
||||
logger.error({ err: error }, 'Create ingestion source error');
|
||||
// Return a 400 Bad Request for connection errors
|
||||
return res
|
||||
.status(400)
|
||||
.json({
|
||||
message:
|
||||
error.message ||
|
||||
'Failed to create ingestion source due to a connection error.',
|
||||
});
|
||||
return res.status(400).json({
|
||||
message:
|
||||
error.message || 'Failed to create ingestion source due to a connection error.',
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user