Skip to content

Commit

Permalink
rename updateFiles() -> updateDocuments
Browse files Browse the repository at this point in the history
  • Loading branch information
Ell1ott committed Feb 28, 2024
1 parent 9c5d560 commit 5240cc8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/lib/api/apiStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export class Assignment extends FileInfo {
}
}

export async function updateFiles() {
export async function updateDocuments() {
const api = getContext('api') as ApiHandler;

const response = await api.getUserDocuments();
Expand Down Expand Up @@ -76,6 +76,8 @@ export function updateUserInfo(state: AuthorizerState) {
export const fileStore = writable<FileInfo[]>([]);
export const assignmentStore = writable<Assignment[]>([]);

export const currentFile = writable<FileInfo | null>(null);

interface userInfo {
name: string;
}
Expand Down
4 changes: 2 additions & 2 deletions src/routes/workspace/Workspace.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import Sidebar from './Sidebar.svelte';
import type { Readable } from 'svelte/store';
import type { AuthorizerState } from 'akademia-authorizer-svelte/types';
import { updateFiles, updateUserInfo, updateAssignments } from '@/api/apiStore';
import { updateDocuments, updateUserInfo, updateAssignments } from '@/api/apiStore';
import ApiHandler from '@/api';
import SidebarAssignment from './SidebarAssignment.svelte';
import ApiDown from '@/components/ApiDown.svelte';
Expand All @@ -21,7 +21,7 @@
});
const api = new ApiHandler(store);
setContext('api', api);
updateFiles();
updateDocuments();
updateAssignments();
updateUserInfo($store);
Expand Down

0 comments on commit 5240cc8

Please sign in to comment.