This is the codeAbility Sharing Platform! Learn more about the codeAbility Sharing Platform.

Skip to content
Snippets Groups Projects
Commit da1b9787 authored by Michael Breu's avatar Michael Breu :speech_balloon:
Browse files

Merge branch 'fix_language_filter' into 'jhipster_update_2022_02'

Fix language filter

See merge request sharing/codeability-sharing-platform!85
parents 516f4c74 4108d7d7
2 merge requests!188Merging Peer Reviewing et. al to Master,!164211 peer reviewing functionality
import { MetadataSearchInput } from 'app/shared/model/search/metadata-search-input.model';
import { ILanguages } from 'app/shared/model/exercise.model';
import { MetadataSearchInput } from 'app/shared/model/search/metadata-search-input.model';
export class SearchInput {
public fulltextQuery: string;
......@@ -23,9 +23,12 @@ export class SearchInput {
this.metadata.parentId = value.parentId;
this.metadata.naturalLanguage = [];
for(const eType of Object.values(ILanguages)) {
Object.keys(ILanguages).forEach(typeName => {
if (value[typeName]) {
const eType = ILanguages[typeName as keyof typeof ILanguages];
this.metadata.naturalLanguage.push(eType);
}
}
});
this.metadata.learningResourceType = '';
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment