mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Extract API endpoints for user avatars
This commit is contained in:
@ -5552,7 +5552,7 @@ function changeMainAPI() {
|
||||
* @returns {Promise<string[]>} List of avatar file names
|
||||
*/
|
||||
export async function getUserAvatars(doRender = true, openPageAt = '') {
|
||||
const response = await fetch('/getuseravatars', {
|
||||
const response = await fetch('/api/avatars/get', {
|
||||
method: 'POST',
|
||||
headers: getRequestHeaders(),
|
||||
});
|
||||
@ -5699,7 +5699,7 @@ async function uploadUserAvatar(e) {
|
||||
|
||||
const formData = new FormData($('#form_upload_avatar').get(0));
|
||||
const dataUrl = await getBase64Async(file);
|
||||
let url = '/uploaduseravatar';
|
||||
let url = '/api/avatars/upload';
|
||||
|
||||
if (!power_user.never_resize_avatars) {
|
||||
$('#dialogue_popup').addClass('large_dialogue_popup wide_dialogue_popup');
|
||||
|
Reference in New Issue
Block a user