diff --git a/lib/oki-api.js b/lib/oki-api.js index 8512817..6b7e743 100644 --- a/lib/oki-api.js +++ b/lib/oki-api.js @@ -52,7 +52,13 @@ export async function jwennKomanteEpiTeksId(teksId) { } export async function jwennUser(userId) { - const query = `_where[id]=${userId}&_where[confirmed]=true` + const query = `_where[id]=${userId}&_where[confirmed]=true&_where[blocked]=false` + const response = await axios.get(`${OKI_API}/users?${query}`) + return response.data[0] +} + +export async function jwennUserEpiEmail(email) { + const query = `_where[email]=${email}&_where[confirmed]=false&_where[blocked]=false` const response = await axios.get(`${OKI_API}/users?${query}`) return response.data[0] }