From 5cae078e5ee9233559f804d466d592b0e431ca99 Mon Sep 17 00:00:00 2001
From: tamaina <tamaina@hotmail.co.jp>
Date: Thu, 20 Apr 2023 16:09:54 +0000
Subject: [PATCH] fix(backend): make isExplorable optional for backward
 compatibility
 https://github.com/misskey-dev/misskey/pull/10677#issuecomment-1516394630

---
 .../backend/src/server/api/endpoints/admin/roles/create.ts   | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/packages/backend/src/server/api/endpoints/admin/roles/create.ts b/packages/backend/src/server/api/endpoints/admin/roles/create.ts
index 5440c4563f..916172f54a 100644
--- a/packages/backend/src/server/api/endpoints/admin/roles/create.ts
+++ b/packages/backend/src/server/api/endpoints/admin/roles/create.ts
@@ -25,7 +25,7 @@ export const paramDef = {
 		isPublic: { type: 'boolean' },
 		isModerator: { type: 'boolean' },
 		isAdministrator: { type: 'boolean' },
-		isExplorable: { type: 'boolean' },
+		isExplorable: { type: 'boolean', default: false }, // optional for backward compatibility
 		asBadge: { type: 'boolean' },
 		canEditMembersByModerator: { type: 'boolean' },
 		displayOrder: { type: 'number' },
@@ -43,7 +43,6 @@ export const paramDef = {
 		'isPublic',
 		'isModerator',
 		'isAdministrator',
-		'isExplorable',
 		'asBadge',
 		'canEditMembersByModerator',
 		'displayOrder',
@@ -84,7 +83,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
 				displayOrder: ps.displayOrder,
 				policies: ps.policies,
 			}).then(x => this.rolesRepository.findOneByOrFail(x.identifiers[0]));
-	
+
 			this.globalEventService.publishInternalEvent('roleCreated', created);
 
 			return await this.roleEntityService.pack(created, me);