Update subscription query in team-accounts API
The data selection in the getSubscription API for team-accounts has been updated. The query now retrieves all items related to the subscription by implementing an inner join within the 'subscription_items' table.
This commit is contained in:
@@ -56,7 +56,7 @@ export class TeamAccountsApi {
|
|||||||
async getSubscription(accountId: string) {
|
async getSubscription(accountId: string) {
|
||||||
const { data, error } = await this.client
|
const { data, error } = await this.client
|
||||||
.from('subscriptions')
|
.from('subscriptions')
|
||||||
.select('*')
|
.select('*, items: subscription_items !inner (*)')
|
||||||
.eq('account_id', accountId)
|
.eq('account_id', accountId)
|
||||||
.maybeSingle();
|
.maybeSingle();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user