Use new export endpoint

This commit is contained in:
Cohee 2024-02-21 11:28:59 +02:00
parent 711fd0517f
commit 92af4137a9
1 changed files with 1 additions and 3 deletions

View File

@ -226,10 +226,8 @@ async function downloadChubCharacter(id) {
* @returns {Promise<{buffer: Buffer, fileName: string, fileType: string}>}
*/
async function downloadPygmalionCharacter(id) {
const result = await fetch('https://server.pygmalion.chat/galatea.v1.PublicCharacterService/CharacterExport', {
const result = await fetch(`https://server.pygmalion.chat/api/export/character/${id}/v2`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ 'character_id': id }),
});
if (!result.ok) {