-
Notifications
You must be signed in to change notification settings - Fork 1
add bedouins as a separate perpetrator affiliation #35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -282,7 +282,7 @@ const ViolationSchema = new mongoose.Schema({ | |
| }, | ||
| perpetrator_affiliation: { | ||
| type: String, | ||
| enum: ['assad_regime', 'post_8th_december_government', 'various_armed_groups', 'isis', 'sdf', 'israel', 'turkey', 'druze_militias', 'russia', 'iran_shia_militias', 'international_coalition', 'unknown'], | ||
| enum: ['assad_regime', 'post_8th_december_government', 'various_armed_groups', 'isis', 'sdf', 'israel', 'turkey', 'druze_militias', 'russia', 'iran_shia_militias', 'international_coalition', 'bedouins', 'unknown'], | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The To improve maintainability, consider defining this list as a constant in a shared file (e.g., For example:
export const PERPETRATOR_AFFILIATIONS = [
'assad_regime',
'post_8th_december_government',
'various_armed_groups',
'isis',
'sdf',
'israel',
'turkey',
'druze_militias',
'russia',
'iran_shia_militias',
'international_coalition',
'bedouins',
'unknown'
];
import { PERPETRATOR_AFFILIATIONS } from '../config/constants';
// ...
perpetrator_affiliation: {
type: String,
enum: PERPETRATOR_AFFILIATIONS,
// ...
}While this change is a larger refactor, it would significantly improve the codebase's quality. |
||
| required: [true, 'Perpetrator affiliation is required'], | ||
| default: 'unknown' | ||
| }, | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file contains merge conflict markers (
<<<<<<< HEAD,=======,>>>>>>>). These must be resolved before the pull request can be merged. Please rebase your branch onto the target branch and resolve the conflicts.