(credentials: ICredentials)
| 16 | }; |
| 17 | |
| 18 | export const getUserHeader = async (credentials: ICredentials) => { |
| 19 | const client = await createTestGraphqlClient({}); |
| 20 | const result = await client.mutation(loginMutation, credentials).toPromise(); |
| 21 | if (result.error || !result.data?.auth || !result.data.auth.startsWith('ey')) |
| 22 | throw new Error('Authentication failed'); |
| 23 | return { authorization: `Bearer ${result.data.auth}` }; |
| 24 | }; |
| 25 | |
| 26 | export const getLinkHeader = async (uuid: string, galleryPasscode?: string) => { |
| 27 | return { |