mirror of
				https://codeberg.org/yeentown/barkey.git
				synced 2025-11-03 23:14:13 +00:00 
			
		
		
		
	fix(backend): アバターとバナーがリセットできない (#10643)
* fix(backend): avatar and banner couldn't be reset * Update CHANGELOG.md
This commit is contained in:
		
							parent
							
								
									d2aba9b693
								
							
						
					
					
						commit
						0ddc79bb91
					
				
					 3 changed files with 9 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -31,6 +31,7 @@
 | 
			
		|||
### Server
 | 
			
		||||
- Fix: エクスポートデータの拡張子がunknownになる問題を修正
 | 
			
		||||
- Fix: Content-Dispositionのパースでエラーが発生した場合にダウンロードが完了しない問題を修正
 | 
			
		||||
- Fix: API: i/update avatarIdとbannerIdにnullを渡した時、画像がリセットされない問題を修正
 | 
			
		||||
 | 
			
		||||
## 13.11.3
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -221,6 +221,10 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
 | 
			
		|||
				updates.avatarId = avatar.id;
 | 
			
		||||
				updates.avatarUrl = this.driveFileEntityService.getPublicUrl(avatar, 'avatar');
 | 
			
		||||
				updates.avatarBlurhash = avatar.blurhash;
 | 
			
		||||
			} else if (ps.avatarId === null) {
 | 
			
		||||
				updates.avatarId = null;
 | 
			
		||||
				updates.avatarUrl = null;
 | 
			
		||||
				updates.avatarBlurhash = null;
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
			if (ps.bannerId) {
 | 
			
		||||
| 
						 | 
				
			
			@ -232,6 +236,10 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
 | 
			
		|||
				updates.bannerId = banner.id;
 | 
			
		||||
				updates.bannerUrl = this.driveFileEntityService.getPublicUrl(banner);
 | 
			
		||||
				updates.bannerBlurhash = banner.blurhash;
 | 
			
		||||
			} else if (ps.bannerId === null) {
 | 
			
		||||
				updates.bannerId = null;
 | 
			
		||||
				updates.bannerUrl = null;
 | 
			
		||||
				updates.bannerBlurhash = null;
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
			if (ps.pinnedPageId) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -508,7 +508,6 @@ describe('ユーザー', () => {
 | 
			
		|||
		};
 | 
			
		||||
		assert.deepStrictEqual(response, expected, inspect(parameters));
 | 
			
		||||
 | 
			
		||||
		if (1) return; // BUG 521eb95 以降アバターのリセットができない。
 | 
			
		||||
		const parameters2 = { avatarId: null };
 | 
			
		||||
		const response2 = await successfulApiCall({ endpoint: 'i/update', parameters: parameters2, user: alice });
 | 
			
		||||
		const expected2 = { 
 | 
			
		||||
| 
						 | 
				
			
			@ -534,7 +533,6 @@ describe('ユーザー', () => {
 | 
			
		|||
		};
 | 
			
		||||
		assert.deepStrictEqual(response, expected, inspect(parameters));
 | 
			
		||||
 | 
			
		||||
		if (1) return; // BUG 521eb95 以降バナーのリセットができない。
 | 
			
		||||
		const parameters2 = { bannerId: null };
 | 
			
		||||
		const response2 = await successfulApiCall({ endpoint: 'i/update', parameters: parameters2, user: alice });
 | 
			
		||||
		const expected2 = { 
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue