code refactoring + many security/bug fixes

This commit is contained in:
daniel31x13
2023-11-06 08:25:57 -05:00
parent b5a28f68ad
commit c8edc3844b
48 changed files with 472 additions and 317 deletions
+2 -2
View File
@@ -17,11 +17,11 @@ declare global {
BUCKET_NAME?: string;
SPACES_REGION?: string;
NEXT_PUBLIC_EMAIL_PROVIDER?: true;
NEXT_PUBLIC_EMAIL_PROVIDER?: string;
EMAIL_FROM?: string;
EMAIL_SERVER?: string;
NEXT_PUBLIC_STRIPE_IS_ACTIVE?: string;
NEXT_PUBLIC_STRIPE?: string;
STRIPE_SECRET_KEY?: string;
MONTHLY_PRICE_ID?: string;
YEARLY_PRICE_ID?: string;
+3
View File
@@ -40,6 +40,9 @@ export interface CollectionIncludingMembersAndLinkCount
export interface AccountSettings extends User {
newPassword?: string;
whitelistedUsers: string[];
subscription?: {
active?: boolean;
};
}
interface LinksIncludingTags extends Link {
+1 -3
View File
@@ -5,7 +5,6 @@ declare module "next-auth" {
interface Session {
user: {
id: number;
isSubscriber: boolean;
};
}
@@ -16,9 +15,8 @@ declare module "next-auth" {
declare module "next-auth/jwt" {
interface JWT {
sub: string;
sub?: number;
id: number;
isSubscriber: boolean;
iat: number;
exp: number;
jti: string;