Skip to content

Commit

Permalink
SQL: Account for dist files in loading extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
mia-pi-git committed Nov 4, 2023
1 parent 5f6d902 commit d6c78db
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/sql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ export class SQLDatabaseManager extends QueryProcessManager<DatabaseQuery, any>
}

loadExtensionFile(extension: string) {
return this.handleExtensions(require(FS(extension).path));
return this.handleExtensions(require('../' + extension));
}
handleExtensions(imports: any) {
if (!this.database) return;
Expand Down
2 changes: 1 addition & 1 deletion server/private-messages/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const MAX_PENDING = 20;
// no idea why.
export const PM = SQL(module, {
file: 'databases/offline-pms.db',
extension: 'dist/server/private-messages/database.js',
extension: 'server/private-messages/database.js',
});

export interface ReceivedPM {
Expand Down

0 comments on commit d6c78db

Please sign in to comment.