mirror of
https://github.com/colanode/colanode.git
synced 2026-05-18 05:05:03 +02:00
Add visibility attribute for spaces
This commit is contained in:
@@ -45,6 +45,7 @@ export class SpaceCreateMutationHandler
|
||||
const spaceAttributes: SpaceAttributes = {
|
||||
type: 'space',
|
||||
name: input.name,
|
||||
visibility: 'private',
|
||||
collaborators: {
|
||||
[input.userId]: 'admin',
|
||||
},
|
||||
|
||||
@@ -72,6 +72,7 @@ class WorkspaceService {
|
||||
type: 'space',
|
||||
name: 'Home',
|
||||
description: 'This is your home space.',
|
||||
visibility: 'private',
|
||||
collaborators: {
|
||||
[userId]: 'admin',
|
||||
},
|
||||
|
||||
@@ -8,6 +8,7 @@ export const spaceAttributesSchema = z.object({
|
||||
description: z.string().nullable().optional(),
|
||||
avatar: z.string().nullable().optional(),
|
||||
collaborators: z.record(z.string(), entryRoleEnum),
|
||||
visibility: z.enum(['public', 'private']).default('private'),
|
||||
});
|
||||
|
||||
export type SpaceAttributes = z.infer<typeof spaceAttributesSchema>;
|
||||
|
||||
@@ -114,6 +114,7 @@ export class NodeGenerator {
|
||||
description,
|
||||
collaborators,
|
||||
avatar,
|
||||
visibility: 'private',
|
||||
};
|
||||
|
||||
const user = this.getMainUser();
|
||||
|
||||
Reference in New Issue
Block a user