Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "osf",
"version": "25.2.0",
"version": "25.3.0",
"scripts": {
"ng": "ng",
"analyze-bundle": "ng build --configuration=analyze-bundle && source-map-explorer dist/**/*.js --no-border-checks",
Expand Down
3 changes: 2 additions & 1 deletion src/app/shared/mappers/wiki/wiki.mapper.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { UserMapper } from '@osf/shared/mappers/user/user.mapper';
import {
ComponentsWikiGetResponse,
HomeWiki,
Expand Down Expand Up @@ -47,7 +48,7 @@ export class WikiMapper {
return {
id: response.id,
createdAt: response.attributes.date_created,
createdBy: response.embeds.user.data.attributes.full_name,
createdBy: UserMapper.getUserInfo(response.embeds.user)?.fullName || 'Unknown author',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be a translation string? We should have one already for this kind of situation.

};
}

Expand Down
11 changes: 3 additions & 8 deletions src/app/shared/models/wiki/wiki.model.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { UserDataErrorResponseJsonApi } from '@shared/models/user/user-json-api.model';

import { JsonApiResponse, JsonApiResponseWithMeta, MetaAnonymousJsonApi } from '../common/json-api.model';

export enum WikiModes {
Expand Down Expand Up @@ -78,14 +80,7 @@ export interface WikiVersionJsonApi {
date_created: string;
};
embeds: {
user: {
data: {
id: string;
attributes: {
full_name: string;
};
};
};
user: UserDataErrorResponseJsonApi;
};
}

Expand Down