refactor
This commit is contained in:
parent
8c2b96ad37
commit
ff6f115976
|
@ -471,8 +471,8 @@ export class UserEntityService implements OnModuleInit {
|
|||
(profile.followersVisibility === 'followers') && (relation && relation.isFollowing) ? user.followersCount :
|
||||
null;
|
||||
|
||||
const isModerator = isMe && isDetailed ? this.roleService.isModerator(user) : null;
|
||||
const isAdmin = isMe && isDetailed ? this.roleService.isAdministrator(user) : null;
|
||||
const isModerator = isMe && isDetailed ? this.roleService.isModerator(user) : false; // この場合undefinedにしたい(レスポンスに含める必要がないため)が、念のため後方互換性を確保
|
||||
const isAdmin = isMe && isDetailed ? this.roleService.isAdministrator(user) : false; // この場合undefinedにしたい(レスポンスに含める必要がないため)が、念のため後方互換性を確保
|
||||
const unreadAnnouncements = isMe && isDetailed ?
|
||||
(await this.announcementService.getUnreadAnnouncements(user)).map((announcement) => ({
|
||||
createdAt: this.idService.parse(announcement.id).date.toISOString(),
|
||||
|
|
|
@ -465,11 +465,11 @@ export const packedMeDetailedOnlySchema = {
|
|||
},
|
||||
isModerator: {
|
||||
type: 'boolean',
|
||||
nullable: true, optional: false,
|
||||
nullable: false, optional: false, // optionalにしたいが念のため後方互換性を確保
|
||||
},
|
||||
isAdmin: {
|
||||
type: 'boolean',
|
||||
nullable: true, optional: false,
|
||||
nullable: false, optional: false, // optionalにしたいが念のため後方互換性を確保
|
||||
},
|
||||
injectFeaturedNote: {
|
||||
type: 'boolean',
|
||||
|
|
|
@ -34,7 +34,7 @@ const props = withDefaults(defineProps<{
|
|||
limit: 50,
|
||||
});
|
||||
|
||||
const chartSrc = ref('per-user-notes');
|
||||
const chartSrc = ref<'per-user-notes' | 'per-user-pv'>('per-user-notes');
|
||||
|
||||
function showMenu(ev: MouseEvent) {
|
||||
os.popupMenu([{
|
||||
|
|
Loading…
Reference in New Issue