Skip to content

Commit 357f280

Browse files
committed
chore: cleanup debug logs
Signed-off-by: Alexander Alemayhu <alexander@alemayhu.com>
1 parent b80ee04 commit 357f280

File tree

2 files changed

+1
-16
lines changed

2 files changed

+1
-16
lines changed

src/controllers/UsersControllers.ts

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import { getRedirect } from './helpers/getRedirect';
99
import { getIndexFileContents } from './IndexController/getIndexFileContents';
1010
import { getRandomUUID } from '../shared/helpers/getRandomUUID';
1111
import { getDefaultAvatarPicture } from '../lib/getDefaultAvatarPicture';
12-
import { getDatabase } from '../data_layer';
1312

1413
class UsersController {
1514
constructor(
@@ -179,19 +178,7 @@ class UsersController {
179178
const user: UserWithOwner | null = await this.authService.getUserFrom(
180179
req.cookies.token
181180
);
182-
console.log('User with owner:', user);
183181
let linkedEmail: string | null = null;
184-
185-
const database = getDatabase();
186-
if (user?.email) {
187-
console.log('Checking subscriber status for user:', user.email);
188-
const subscriber = await this.authService.getIsSubscriber(
189-
database,
190-
user.email
191-
);
192-
console.log('Subscriber status:', subscriber);
193-
}
194-
195182
if (user?.owner) {
196183
linkedEmail = await this.userService.getSubscriptionLinkedEmail(
197184
user?.owner.toString()
@@ -209,7 +196,7 @@ class UsersController {
209196
locals,
210197
linked_email: linkedEmail,
211198
};
212-
console.debug('getLocals: Sending response:', response);
199+
213200
return res.json(response);
214201
}
215202

src/services/AuthenticationService.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,11 +122,9 @@ class AuthenticationService {
122122
.first();
123123

124124
if (linkedEmail?.active) {
125-
console.log('Found active subscription for linked email:', linkedEmail);
126125
return true;
127126
}
128127

129-
console.log('Checking subscriber status for email:', email);
130128
const result = await db('subscriptions')
131129
.select('active')
132130
.where({ email: email.toLowerCase() })

0 commit comments

Comments
 (0)