feat(api): make methods public

This commit is contained in:
yassinedorbozgithub 2024-10-07 15:39:16 +01:00
parent 16101f2638
commit 3c8deb854e
2 changed files with 3 additions and 3 deletions

View File

@ -68,7 +68,7 @@ export class BotStatsService extends BaseService<BotStats> {
* @param {Subscriber} subscriber - The subscriber object that contains last visit and retention data.
*/
@OnEvent('hook:user:lastvisit')
private handleLastVisit(subscriber: Subscriber) {
handleLastVisit(subscriber: Subscriber) {
const now = +new Date();
if (subscriber.lastvisit) {
// A loyal subscriber is a subscriber that comes back after some inactivity
@ -110,7 +110,7 @@ export class BotStatsService extends BaseService<BotStats> {
* @param name - The name or identifier of the statistics entry (e.g., a specific feature or component being tracked).
*/
@OnEvent('hook:stats:entry')
private async handleStatEntry(type: BotStatsType, name: string) {
async handleStatEntry(type: BotStatsType, name: string) {
const day = new Date();
day.setMilliseconds(0);
day.setSeconds(0);

View File

@ -235,7 +235,7 @@ export class SubscriberService extends BaseService<
* @param subscriber The subscriber whose is being handled.
*/
@OnEvent('hook:user:lastvisit')
private async handleLastVisit(subscriber: Subscriber) {
async handleLastVisit(subscriber: Subscriber) {
if (subscriber.lastvisit) {
try {
const user = await this.updateOne(subscriber.id, {