From da66872690af8f6419f1fc09e69a6c0161f8e27d Mon Sep 17 00:00:00 2001 From: Alex Mickelson Date: Thu, 26 Mar 2026 14:12:15 -0600 Subject: [PATCH] tokens --- globalSettings.yml | 2 ++ requests/nav.http | 20 ++++++++++++++++++- .../context/drag/draggingContext.tsx | 7 +++---- 3 files changed, 24 insertions(+), 5 deletions(-) diff --git a/globalSettings.yml b/globalSettings.yml index 99e25c9..cd25b95 100644 --- a/globalSettings.yml +++ b/globalSettings.yml @@ -21,3 +21,5 @@ courses: name: adv-frontend-old - path: ./1810/2026-spring-alex/modules/ name: Web Intro + - path: ./1810/2025-spring-alex/in-person/ + name: web-2025 diff --git a/requests/nav.http b/requests/nav.http index 83380e1..5d9c73d 100644 --- a/requests/nav.http +++ b/requests/nav.http @@ -1,4 +1,22 @@ # https://developerdocs.instructure.com/services/canvas/file.all_resources/tabs#method.tabs.index ### GET https://snow.instructure.com/api/v1/courses/1155200/tabs -Authorization: Bearer {{$dotenv CANVAS_TOKEN}} \ No newline at end of file +Authorization: Bearer {{$dotenv CANVAS_TOKEN}} + + +### +GET https://snow.instructure.com/api/v1/users/self +Authorization: Bearer {{$dotenv CANVAS_TOKEN}} + +# https://developerdocs.instructure.com/services/canvas/TokensController/create +### +POST https://snow.instructure.com/api/v1/users/self/tokens +Authorization: Bearer {{$dotenv CANVAS_TOKEN}} +Content-Type: application/json + +{ + "token": { + "purpose": "canvas-management-test", + "expires_at": "2027-01-01T00:00:00Z" + } +} \ No newline at end of file diff --git a/src/app/course/[courseName]/context/drag/draggingContext.tsx b/src/app/course/[courseName]/context/drag/draggingContext.tsx index c8c7b29..4b1c173 100644 --- a/src/app/course/[courseName]/context/drag/draggingContext.tsx +++ b/src/app/course/[courseName]/context/drag/draggingContext.tsx @@ -12,12 +12,11 @@ export interface DraggingContextInterface { itemDropOnDay: (e: DragEvent, droppedOnDay: string) => void; itemDropOnModule: (e: DragEvent, moduleName: string) => void; } -const defaultDraggingValue: DraggingContextInterface = { +export const DraggingContext = + createContext({ itemDropOnDay: () => {}, itemDropOnModule: () => {}, -}; -export const DraggingContext = - createContext(defaultDraggingValue); +}); export function useDraggingContext() { return useContext(DraggingContext);