Skip to content

Commit 9e84a53

Browse files
Copilothotlong
andcommitted
Fix service registration conflicts for latest spec protocol
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
1 parent 4a80ff6 commit 9e84a53

2 files changed

Lines changed: 1 addition & 12 deletions

File tree

packages/auth/src/plugin.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,7 @@ export class BetterAuthPlugin implements Plugin {
6161
this.handler = toNodeHandler(this.authInstance);
6262

6363
// Register the plugin as a service
64-
// Register as 'auth' to provide the standard Auth interface
65-
context.registerService('auth', this);
64+
// Only register as 'better-auth' since 'auth' is auto-registered by ObjectQL
6665
context.registerService('better-auth', this);
6766

6867
// Register route handler through a hook or service

packages/metrics/src/plugin.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -64,16 +64,6 @@ export class MetricsPlugin implements Plugin {
6464
* Initialize plugin - Register services and subscribe to events
6565
*/
6666
init = async (context: PluginContext): Promise<void> => {
67-
// [Hotfix] Alias objectql to data/metadata
68-
try {
69-
// Use 'any' to bypass strict service type checks if needed
70-
const objectql = context.getService('objectql');
71-
if (objectql) {
72-
context.registerService('data', objectql);
73-
context.registerService('metadata', objectql);
74-
}
75-
} catch (e) { console.warn('Alias error', e); }
76-
7767
this.context = context;
7868

7969
// Register metrics service

0 commit comments

Comments
 (0)