Skip to content

Commit

Permalink
🐛 修复onedrive空间问题 #224
Browse files Browse the repository at this point in the history
  • Loading branch information
CodFrm committed Nov 28, 2023
1 parent dc56ec6 commit 0d10588
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions pkg/filesystem/onedrive/onedrive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export default class OneDriveFileSystem implements FileSystem {
parent = `:${parent}:`;
}
return this.request(
`https://graph.microsoft.com/v1.0/drive/special/approot${parent}/children`,
`https://graph.microsoft.com/v1.0/me/drive/special/approot${parent}/children`,
{
method: "POST",
headers: myHeaders,
Expand Down Expand Up @@ -119,7 +119,7 @@ export default class OneDriveFileSystem implements FileSystem {

delete(path: string): Promise<void> {
return this.request(
`https://graph.microsoft.com/v1.0/drive/special/approot:${joinPath(
`https://graph.microsoft.com/v1.0/me/drive/special/approot:${joinPath(
this.path,
path
)}`,
Expand All @@ -143,7 +143,7 @@ export default class OneDriveFileSystem implements FileSystem {
path = `:${path}:`;
}
return this.request(
`https://graph.microsoft.com/v1.0/drive/special/approot${path}/children`
`https://graph.microsoft.com/v1.0/me/drive/special/approot${path}/children`
).then((data) => {
const list: File[] = [];
data.value.forEach((val: any) => {
Expand Down
4 changes: 2 additions & 2 deletions pkg/filesystem/onedrive/rw.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export class OneDriveFileReader implements FileReader {

async read(type?: "string" | "blob"): Promise<string | Blob> {
const data = await this.fs.request(
`https://graph.microsoft.com/v1.0/drive/special/approot:${joinPath(
`https://graph.microsoft.com/v1.0/me/drive/special/approot:${joinPath(
this.file.path,
this.file.name
)}:/content`,
Expand Down Expand Up @@ -69,7 +69,7 @@ export class OneDriveFileWriter implements FileWriter {
myHeaders.append("Content-Type", "application/json");
const uploadUrl = await this.fs
.request(
`https://graph.microsoft.com/v1.0/drive/special/approot:${this.path}:/createUploadSession`,
`https://graph.microsoft.com/v1.0/me/drive/special/approot:${this.path}:/createUploadSession`,
{
method: "POST",
headers: myHeaders,
Expand Down

0 comments on commit 0d10588

Please sign in to comment.