mirror of
https://github.com/LukeHagar/better-auth.git
synced 2025-12-09 20:27:44 +00:00
chore: fix test
This commit is contained in:
@@ -17,7 +17,7 @@ services:
|
||||
POSTGRES_PASSWORD: password
|
||||
POSTGRES_DB: better_auth
|
||||
ports:
|
||||
- "5433:5432"
|
||||
- "5432:5432"
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ describe("anonymous", async () => {
|
||||
});
|
||||
|
||||
it("link anonymous user account", async () => {
|
||||
const linkedAccount = await client.user.linkAnonymous({
|
||||
const linkedAccount = await client.anonymous.linkAccount({
|
||||
email: "valid-email@email.com",
|
||||
password: "valid-password",
|
||||
});
|
||||
|
||||
@@ -80,6 +80,7 @@ export const anonymous = (options?: AnonymousOptions) => {
|
||||
if (email && password) {
|
||||
updatedUser = await ctx.context.internalAdapter.updateUser(userId, {
|
||||
email: email,
|
||||
isAnonymous: false,
|
||||
});
|
||||
}
|
||||
if (!updatedUser) {
|
||||
@@ -98,7 +99,6 @@ export const anonymous = (options?: AnonymousOptions) => {
|
||||
providerId: "credential",
|
||||
password: hash,
|
||||
accountId: updatedUser.id,
|
||||
isAnonymous: false,
|
||||
});
|
||||
if (!updateUserAccount) {
|
||||
return ctx.json(null, {
|
||||
|
||||
Reference in New Issue
Block a user