Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create .space folder if removed #9793

Merged
merged 7 commits into from
Oct 20, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
useCreateSpace fix
jacob-nv committed Oct 20, 2023
commit 22de7c635b553858039243a5529cef47612b3502
12 changes: 5 additions & 7 deletions packages/web-pkg/src/composables/spaces/useCreateSpace.ts
Original file line number Diff line number Diff line change
@@ -21,23 +21,21 @@ export const useCreateSpace = () => {
}

const createDefaultMetaFolder = async (space: SpaceResource) => {
await clientService.webdav.createFolder(space, { path: '.space' })
await clientService.webdav.putFileContents(space, {
const { graphAuthenticated, webdav } = clientService
await webdav.createFolder(space, { path: '.space' })
const file = await webdav.putFileContents(space, {
path: '.space/readme.md',
content: $gettext('Here you can add a description for this Space.')
})
const file = await clientService.webdav.getFileInfo(space, {
path: '.space/readme.md'
})
const { data: updatedDriveData } = await clientService.graphAuthenticated.drives.updateDrive(
const { data: updatedDriveData } = await graphAuthenticated.drives.updateDrive(
space.id as string,
{
special: [
{
specialFolder: {
name: 'readme'
},
id: file.id
id: file.id as string
}
]
} as Drive,