Add jwennUser and jwennUserEpiEmail to oki-api
This commit is contained in:
+7
-1
@@ -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]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user