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