@ -16,7 +16,7 @@ const media = (client: PlApiBaseClient) => ({
|
||||
uploadMedia: async (params: UploadMediaParams, meta?: RequestMeta) => {
|
||||
const response = await client.request(
|
||||
client.features.mediaV2 ? '/api/v2/media' : '/api/v1/media',
|
||||
{ ...meta, method: 'POST', body: params, contentType: '' },
|
||||
{ ...meta, method: 'POST', body: params, formData: true },
|
||||
);
|
||||
|
||||
return v.parse(mediaAttachmentSchema, response.json);
|
||||
|
||||
@ -19,7 +19,7 @@ const oauth = (client: PlApiBaseClient) => ({
|
||||
* @see {@link https://docs.joinmastodon.org/methods/oauth/#authorize}
|
||||
*/
|
||||
authorize: async (params: OauthAuthorizeParams) => {
|
||||
const response = await client.request('/oauth/authorize', { params, contentType: '' });
|
||||
const response = await client.request('/oauth/authorize', { params, formData: true });
|
||||
|
||||
return v.parse(v.string(), response.json);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user