Stripe Pricing + Subscriptions

This commit is contained in:
2024-08-21 21:13:43 +02:00
parent 48bff89526
commit b4609d07ba
16 changed files with 969 additions and 1035 deletions

View File

@@ -1,5 +1,6 @@
import { Injectable } from '@nestjs/common';
import ky from 'ky';
import { KeycloakUser } from 'src/models/main.model';
import urlcat from 'urlcat';
@Injectable()
@@ -37,7 +38,7 @@ export class AuthService {
}
}
public async getUsers() {
public async getUsers(): Promise<KeycloakUser[]> {
const token = await this.getAccessToken();
const URL = `${process.env.host}${process.env.usersURL}`;
const response = await ky
@@ -48,7 +49,7 @@ export class AuthService {
},
})
.json();
return response;
return response as KeycloakUser[];
}
public async getUser(userid: string) {
const token = await this.getAccessToken();