登录注册接入数据库
This commit is contained in:
@@ -786,7 +786,12 @@ export class AkSupa {
|
||||
};
|
||||
}
|
||||
|
||||
async signUp(email : string, password : string) : Promise<UTSJSONObject> {
|
||||
async signUp(email : string, password : string, options ?: UTSJSONObject) : Promise<UTSJSONObject> {
|
||||
const body = { email, password } as UTSJSONObject;
|
||||
if (options != null && options.get('data') != null) {
|
||||
body['data'] = options.get('data');
|
||||
}
|
||||
|
||||
const res = await AkReq.request({
|
||||
url: this.baseUrl + '/auth/v1/signup',
|
||||
method: 'POST',
|
||||
@@ -794,7 +799,7 @@ export class AkSupa {
|
||||
apikey: this.apikey,
|
||||
'Content-Type': 'application/json'
|
||||
} as UTSJSONObject,
|
||||
data: { email, password } as UTSJSONObject,
|
||||
data: body,
|
||||
contentType: 'application/json'
|
||||
}, false);
|
||||
return res.data as UTSJSONObject;
|
||||
|
||||
Reference in New Issue
Block a user