add medreport schema
This commit is contained in:
@@ -74,7 +74,7 @@ class OtpService {
|
||||
logger.info(ctx, 'Creating one-time token');
|
||||
|
||||
try {
|
||||
const result = await this.client.rpc('create_nonce', {
|
||||
const result = await this.client.schema('medreport').rpc('create_nonce', {
|
||||
p_user_id: userId,
|
||||
p_purpose: purpose,
|
||||
p_expires_in_seconds: expiresInSeconds,
|
||||
@@ -135,7 +135,7 @@ class OtpService {
|
||||
logger.info(ctx, 'Verifying one-time token');
|
||||
|
||||
try {
|
||||
const result = await this.client.rpc('verify_nonce', {
|
||||
const result = await this.client.schema('medreport').rpc('verify_nonce', {
|
||||
p_token: token,
|
||||
p_user_id: params.userId,
|
||||
p_purpose: purpose,
|
||||
@@ -184,10 +184,12 @@ class OtpService {
|
||||
logger.info(ctx, 'Revoking one-time token');
|
||||
|
||||
try {
|
||||
const { data, error } = await this.client.rpc('revoke_nonce', {
|
||||
p_id: id,
|
||||
p_reason: reason,
|
||||
});
|
||||
const { data, error } = await this.client
|
||||
.schema('medreport')
|
||||
.rpc('revoke_nonce', {
|
||||
p_id: id,
|
||||
p_reason: reason,
|
||||
});
|
||||
|
||||
if (error) {
|
||||
logger.error(
|
||||
@@ -225,9 +227,11 @@ class OtpService {
|
||||
logger.info(ctx, 'Getting one-time token status');
|
||||
|
||||
try {
|
||||
const result = await this.client.rpc('get_nonce_status', {
|
||||
p_id: id,
|
||||
});
|
||||
const result = await this.client
|
||||
.schema('medreport')
|
||||
.rpc('get_nonce_status', {
|
||||
p_id: id,
|
||||
});
|
||||
|
||||
if (result.error) {
|
||||
logger.error(
|
||||
|
||||
Reference in New Issue
Block a user