<commit_before>import { Request, Response } from '../../misskey-express';
import update from '../../endpoints/account/update-avatar';

export default function updateIcon(req: Request, res: Response): void {
	'use strict';
	update(req.misskeyUser, req.body['file-id']).then((me: Object) => {
		res.apiRender(me);
	}, (err: any) => {
		res.apiError(500, err);
	});
};<commit_msg>Fix bug<commit_after>import * as hapi from 'hapi';
import { IApplication, IUser } from '../../interfaces';
import update from '../../endpoints/account/update-avatar';

export default function updateIcon(
	app: IApplication,
	user: IUser,
	req: hapi.Request,
	res: hapi.IReply
): void {
	'use strict';
	update(user, req.payload['file-id']).then((me: Object) => {
		res(me);
	}, (err: any) => {
		res(err).code(500);
	});
};
{'fraction_non_alphanumeric': 0.20525657071339173, 'fraction_numerical': 0.007509386733416771, 'mean_word_length': 4.333333333333333, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3859049', 'n_tokens_mistral': 284, 'n_tokens_neox': 279, 'n_words': 64}