Skip to content

Commit

Permalink
JSDocify
Browse files Browse the repository at this point in the history
  • Loading branch information
webdev03 committed Oct 26, 2023
1 parent 30a1dfc commit 6d39983
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/classes/Project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,9 @@ class Project {
return Number((await request.json())["id"]);
}

/**
* Set if comments should be allowed or not
*/
async setCommentsAllowed(state: boolean) {
if (!this.session?.auth) throw Error("You need to be logged in");
const request = await fetch(
Expand Down
3 changes: 3 additions & 0 deletions src/classes/forums/Post.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ class Post {
if (data) this.data = data;
}

/**
* Gets data from the Scratch website and sets the Post.data
*/
async setData() {
const request = await fetch(
`https://scratch.mit.edu/discuss/m/post/${this.id}`
Expand Down
3 changes: 3 additions & 0 deletions src/classes/forums/Topic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ class Topic {
if (data) this.data = data;
}

/**
* Gets data from the Scratch website and sets the Topic.data
*/
async setData() {
const request = await fetch(
`https://scratch.mit.edu/discuss/m/topic/${this.id}`
Expand Down

0 comments on commit 6d39983

Please sign in to comment.