Skip to content

Add update, delete, add methods for absences#122

Open
Fermenade wants to merge 13 commits into
SchoolUtils:masterfrom
Fermenade:master
Open

Add update, delete, add methods for absences#122
Fermenade wants to merge 13 commits into
SchoolUtils:masterfrom
Fermenade:master

Conversation

@Fermenade
Copy link
Copy Markdown

@Fermenade Fermenade commented Apr 8, 2026

Hi,
here is some code that let's an user add, update and delete absences.

Changed some function names for clarity.
Added datatype representing the return type from untis
Added quality of life date time function
Added functions for add, remove and update operation

Copy link
Copy Markdown

@ghost ghost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unsafe parsing: In extractObjectByName, add a safety check for script.children[0].data. It will crash with a TypeError on empty script tags.
Error handling: Make the final throw more descriptive (e.g., "CSRF token object not found")
Timezones: Double-check if manual date-to-string conversion handles timezone offsets correctly to avoid shifts.

@ghost
Copy link
Copy Markdown

ghost commented Apr 10, 2026

CSRF implementation is a necessary step, but its current stability is questionable. Fix the mentioned issues to meet the standard. We don't need more 'maybe-working' code in the core.

@Fermenade
Copy link
Copy Markdown
Author

I'll take a look

@Fermenade
Copy link
Copy Markdown
Author

Not sure how to do the type definition file stuff. Does anyone know? :)

Comment thread src/base.ts Outdated
Comment thread src/base.ts Outdated
Comment thread src/base.ts Outdated
Comment thread src/base.ts Outdated
Comment thread src/base.ts Outdated
Comment thread src/base.ts Outdated
Comment thread src/types.ts
Comment thread src/base.ts Outdated
Comment thread src/base.ts
Comment thread src/base.ts Outdated
@Fermenade Fermenade requested a review from TheNoim April 17, 2026 13:45
@Fermenade
Copy link
Copy Markdown
Author

@TheNoim just wanna check in. Do you see anymore problems in the code?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants