mirror of
https://github.com/wassname/Open-Assistant.git
synced 2026-07-07 00:06:32 +08:00
Merge remote-tracking branch 'upstream/main'
This commit is contained in:
@@ -43,10 +43,19 @@ if (boolean(process.env.DEBUG_LOGIN) || process.env.NODE_ENV === "development")
|
||||
username: { label: "Username", type: "text" },
|
||||
},
|
||||
async authorize(credentials) {
|
||||
return {
|
||||
const user = {
|
||||
id: credentials.username,
|
||||
name: credentials.username,
|
||||
};
|
||||
// save the user to the database
|
||||
await prisma.user.upsert({
|
||||
where: {
|
||||
id: user.id,
|
||||
},
|
||||
update: {},
|
||||
create: user,
|
||||
});
|
||||
return user;
|
||||
},
|
||||
})
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user