Commit 31888535 authored by Ben Hayward's avatar Ben Hayward

Removed console logs

1 merge request!613WIP: [Sprint/QuietQuail](fix): Blog & media edit updated to new nsfw system #1936
Pipeline #97599328 running with stages
......@@ -71,7 +71,11 @@
<option *ngFor="let a of access" [value]="a.value">{{ a.text }}</option>
</select>
</div>
<m-nsfw-selector (selectedChange)="onNSWFSelections($event)">
<m-nsfw-selector
(selectedChange)="onNSFWSelections($event)"
(onInit)="onNSFWSelections($event)"
[selected]="entity.nsfw"
>
</m-nsfw-selector>
</div>
</form>
......@@ -30,7 +30,7 @@ export class MediaEditComponent {
description: '',
subtype: '',
license: 'all-rights-reserved',
mature: false,
nsfw: [],
};
inProgress: boolean;
error: string;
......@@ -72,7 +72,7 @@ export class MediaEditComponent {
.get('api/v1/entities/entity/' + this.guid, { children: false })
.then((response: any) => {
this.inProgress = false;
console.log(response);
if (response.entity) {
if (!response.entity.description) response.entity.description = '';
......@@ -82,6 +82,7 @@ export class MediaEditComponent {
response.entity.mature =
response.entity.flags && response.entity.flags.mature ? 1 : 0;
this.entity.nsfw = response.entity.nsfw;
this.entity = response.entity;
}
});
......@@ -111,7 +112,7 @@ export class MediaEditComponent {
* Sets this blog NSFW
* @param { array } nsfw - Numerical indexes for reasons in an array e.g. [1, 2].
*/
onNSWFSelections(nsfw) {
onNSFWSelections(nsfw) {
this.entity.nsfw = nsfw.map(reason => reason.value);
}
}
Please register or to comment