mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
17 lines
438 B
JavaScript
17 lines
438 B
JavaScript
import { request } from 'graphql-request'
|
|
|
|
// this is the to-be-tested server host
|
|
// not to be confused with the seeder host
|
|
export const host = 'http://127.0.0.1:4123'
|
|
|
|
export async function login ({ email, password }) {
|
|
const mutation = `
|
|
mutation {
|
|
login(email:"${email}", password:"${password}")
|
|
}`
|
|
const response = await request(host, mutation)
|
|
return {
|
|
authorization: `Bearer ${response.login}`
|
|
}
|
|
}
|