-
Notifications
You must be signed in to change notification settings - Fork 0
User
Yos666666 edited this page Oct 7, 2022
·
5 revisions
/src/api/user/index.js
getUser(userID)
slug
-string
: User ID
Example
import { getUser } from '@aquilacms/aquila-connector/api/user';
user = await getUser('userId');
setUser(user)
user
-any
: Object containing the data
Example
import { setUser } from '@aquilacms/aquila-connector/api/user';
user = await setUser(data);
setAddressesUser(userId, billingAddress, deliveryAddress, addresses)
userId
-string
: User IDbillingAddress
-int
: Billing address indexdeliveryAddress
-int
: Delivery address indexaddresses
-any
: addresses
Example
import { SetAddressesUser } from '@aquilacms/aquila-connector/api/user';
userAdress = await SetAddressesUser('userId', 0, 1, adresses);
resetPassword(token, password)
token
-string
: Reset Tokenpassword
-string
: New Password
Example
import { resetPassword } from '@aquilacms/aquila-connector/api/user';
userPassword = await resetPassword(token, password);
validateAccount(token)
token
-string
: Activation token
Example
import { validateAccount } from '@aquilacms/aquila-connector/api/user';
const newUser = await validateAccount(token);
dataUserExport(userId)
userId
-string
: User ID
Example
import { dataUserExport } from '@aquilacms/aquila-connector/api/user';
const response = await dataUserExport('userId');
anonymizeUser(userId)
userId
-string
: User ID
Example
import { anonymizeUser } from '@aquilacms/aquila-connector/api/user';
const namelessUser = await anonymizeUser('userId');
deleteUser(userId)
Example
import { deleteUser} from '@aquilacms/aquila-connector/api/user';
const deletAccount = await deleteUser('userId');
userId
-string
: User ID