fix lint
This commit is contained in:
		| @@ -55,23 +55,29 @@ export class AntennaService implements OnApplicationShutdown { | ||||
| 			const { type, body } = obj.message as GlobalEvents['internal']['payload']; | ||||
| 			switch (type) { | ||||
| 				case 'antennaCreated': | ||||
| 					this.antennas.push({ | ||||
| 					this.antennas.push({ // TODO: このあたりのデシリアライズ処理は各modelファイル内に関数としてexportしたい | ||||
| 						...body, | ||||
| 						lastUsedAt: new Date(body.lastUsedAt), | ||||
| 						user: null, // joinなカラムは通常取ってこないので | ||||
| 						userList: null, // joinなカラムは通常取ってこないので | ||||
| 					}); | ||||
| 					break; | ||||
| 				case 'antennaUpdated': { | ||||
| 					const idx = this.antennas.findIndex(a => a.id === body.id); | ||||
| 					if (idx >= 0) { | ||||
| 						this.antennas[idx] = { | ||||
| 						this.antennas[idx] = { // TODO: このあたりのデシリアライズ処理は各modelファイル内に関数としてexportしたい | ||||
| 							...body, | ||||
| 							lastUsedAt: new Date(body.lastUsedAt), | ||||
| 							user: null, // joinなカラムは通常取ってこないので | ||||
| 							userList: null, // joinなカラムは通常取ってこないので | ||||
| 						}; | ||||
| 					} else { | ||||
| 						// サーバ起動時にactiveじゃなかった場合、リストに持っていないので追加する必要あり | ||||
| 						this.antennas.push({ | ||||
| 						this.antennas.push({ // TODO: このあたりのデシリアライズ処理は各modelファイル内に関数としてexportしたい | ||||
| 							...body, | ||||
| 							lastUsedAt: new Date(body.lastUsedAt), | ||||
| 							user: null, // joinなカラムは通常取ってこないので | ||||
| 							userList: null, // joinなカラムは通常取ってこないので | ||||
| 						}); | ||||
| 					} | ||||
| 				} | ||||
|   | ||||
| @@ -51,7 +51,10 @@ export class MetaService implements OnApplicationShutdown { | ||||
| 			const { type, body } = obj.message as GlobalEvents['internal']['payload']; | ||||
| 			switch (type) { | ||||
| 				case 'metaUpdated': { | ||||
| 					this.cache = body; | ||||
| 					this.cache = { // TODO: このあたりのデシリアライズ処理は各modelファイル内に関数としてexportしたい | ||||
| 						...body, | ||||
| 						proxyAccount: null, // joinなカラムは通常取ってこないので | ||||
| 					}; | ||||
| 					break; | ||||
| 				} | ||||
| 				default: | ||||
|   | ||||
| @@ -177,9 +177,10 @@ export class RoleService implements OnApplicationShutdown, OnModuleInit { | ||||
| 				case 'userRoleAssigned': { | ||||
| 					const cached = this.roleAssignmentByUserIdCache.get(body.userId); | ||||
| 					if (cached) { | ||||
| 						cached.push({ | ||||
| 						cached.push({ // TODO: このあたりのデシリアライズ処理は各modelファイル内に関数としてexportしたい | ||||
| 							...body, | ||||
| 							expiresAt: body.expiresAt ? new Date(body.expiresAt) : null, | ||||
| 							user: null, // joinなカラムは通常取ってこないので | ||||
| 						}); | ||||
| 					} | ||||
| 					break; | ||||
|   | ||||
| @@ -49,9 +49,10 @@ export class WebhookService implements OnApplicationShutdown { | ||||
| 			switch (type) { | ||||
| 				case 'webhookCreated': | ||||
| 					if (body.active) { | ||||
| 						this.webhooks.push({ | ||||
| 						this.webhooks.push({ // TODO: このあたりのデシリアライズ処理は各modelファイル内に関数としてexportしたい | ||||
| 							...body, | ||||
| 							latestSentAt: body.latestSentAt ? new Date(body.latestSentAt) : null, | ||||
| 							user: null, // joinなカラムは通常取ってこないので | ||||
| 						}); | ||||
| 					} | ||||
| 					break; | ||||
| @@ -59,14 +60,16 @@ export class WebhookService implements OnApplicationShutdown { | ||||
| 					if (body.active) { | ||||
| 						const i = this.webhooks.findIndex(a => a.id === body.id); | ||||
| 						if (i > -1) { | ||||
| 							this.webhooks[i] = { | ||||
| 							this.webhooks[i] = { // TODO: このあたりのデシリアライズ処理は各modelファイル内に関数としてexportしたい | ||||
| 								...body, | ||||
| 								latestSentAt: body.latestSentAt ? new Date(body.latestSentAt) : null, | ||||
| 								user: null, // joinなカラムは通常取ってこないので | ||||
| 							}; | ||||
| 						} else { | ||||
| 							this.webhooks.push({ | ||||
| 							this.webhooks.push({ // TODO: このあたりのデシリアライズ処理は各modelファイル内に関数としてexportしたい | ||||
| 								...body, | ||||
| 								latestSentAt: body.latestSentAt ? new Date(body.latestSentAt) : null, | ||||
| 								user: null, // joinなカラムは通常取ってこないので | ||||
| 							}); | ||||
| 						} | ||||
| 					} else { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 syuilo
					syuilo