bug fixed
This commit is contained in:
@@ -59,6 +59,7 @@ export default async function updateCollection(
|
||||
include: {
|
||||
user: {
|
||||
select: {
|
||||
image: true,
|
||||
username: true,
|
||||
name: true,
|
||||
id: true,
|
||||
|
||||
@@ -40,6 +40,7 @@ export default async function getPublicUserById(
|
||||
const { password, ...lessSensitiveInfo } = user;
|
||||
|
||||
const data = {
|
||||
id: lessSensitiveInfo.id,
|
||||
name: lessSensitiveInfo.name,
|
||||
username: lessSensitiveInfo.username,
|
||||
image: lessSensitiveInfo.image,
|
||||
|
||||
@@ -27,10 +27,10 @@ const addMemberToCollection = async (
|
||||
if (user.username) {
|
||||
setMember({
|
||||
collectionId: collection.id,
|
||||
userId: user.id,
|
||||
canCreate: false,
|
||||
canUpdate: false,
|
||||
canDelete: false,
|
||||
userId: user.id,
|
||||
user: {
|
||||
id: user.id,
|
||||
name: user.name,
|
||||
|
||||
@@ -5,8 +5,6 @@ export default async function getPublicUserData(id: number | string) {
|
||||
|
||||
const data = await response.json();
|
||||
|
||||
console.log(data);
|
||||
|
||||
if (!response.ok) toast.error(data.response);
|
||||
|
||||
return data.response;
|
||||
|
||||
Reference in New Issue
Block a user