Improve handling of backup CDN read credentials

This commit is contained in:
trevor-signal
2025-09-08 14:00:18 -04:00
committed by GitHub
parent 0c5f5aaaf9
commit c85ad2b867
6 changed files with 87 additions and 42 deletions

View File

@@ -1350,7 +1350,7 @@ export type GetBackupCredentialsResponseType = z.infer<
export type GetBackupCDNCredentialsOptionsType = Readonly<{
headers: BackupPresentationHeadersType;
cdn: number;
cdnNumber: number;
}>;
export const getBackupCDNCredentialsResponseSchema = z.object({
@@ -3645,7 +3645,7 @@ export function initialize({
async function getBackupCDNCredentials({
headers,
cdn,
cdnNumber,
}: GetBackupCDNCredentialsOptionsType) {
return _ajax({
host: 'chatService',
@@ -3655,7 +3655,7 @@ export function initialize({
accessKey: undefined,
groupSendToken: undefined,
headers,
urlParameters: `?cdn=${cdn}`,
urlParameters: `?cdn=${cdnNumber}`,
responseType: 'json',
zodSchema: getBackupCDNCredentialsResponseSchema,
});