Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

api interface #1

Merged
merged 11 commits into from
Jun 4, 2024
Merged

api interface #1

merged 11 commits into from
Jun 4, 2024

Conversation

SKairinos
Copy link
Contributor

@SKairinos SKairinos commented Jun 3, 2024

This change is Reviewable

Copy link
Contributor Author

@SKairinos SKairinos left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 15 files reviewed, 1 unresolved discussion


package.json line 23 at r1 (raw file):

  "dependencies": {
    "@reduxjs/toolkit": "^2.0.1",
    "codeforlife": "github:ocadotechnology/codeforlife-package-javascript#fix_api_types",

install new version

Copy link
Contributor Author

@SKairinos SKairinos left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 15 files reviewed, 2 unresolved discussions


src/api/teacher.ts line 33 at r1 (raw file):

    removeTeacherFromSchool: build.mutation<
      UpdateResult<Teacher, "user">,
      Teacher["id"]

UpdateArg

Copy link
Contributor

@faucomte97 faucomte97 left a comment

Choose a reason for hiding this comment

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

Reviewed 11 of 15 files at r1, 4 of 4 files at r2, all commit messages.
Reviewable status: all files reviewed, 6 unresolved discussions (waiting on @SKairinos)


src/api/klass.ts line 26 at r2 (raw file):

        Class,
        "name" | "read_classmates_data",
        "teacher" | "receive_requests_until"

Wanted to double check if receive_requests_until is in fact a required arg for creating a class. It looks like it is in the serializer, but are we planning to require teachers to provide this setting when creating a class? Default value currently is just "never" / "off"


src/api/schoolTeacherInvitation.ts line 50 at r2 (raw file):

    >({
      query: ([id, body]) => ({
        url: buildUrl(detailUrl, { url: { id } }),

add /accept


src/api/schoolTeacherInvitation.ts line 61 at r2 (raw file):

    >({
      query: id => ({
        url: buildUrl(detailUrl, { url: { id } }),

add /reject


src/api/user.ts line 52 at r2 (raw file):

      }),
    }),
    verifyEmailAddress: build.mutation<

should this invalidate tags too?

Copy link
Contributor Author

@SKairinos SKairinos left a comment

Choose a reason for hiding this comment

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

Reviewable status: 13 of 15 files reviewed, 5 unresolved discussions (waiting on @faucomte97)


src/api/klass.ts line 26 at r2 (raw file):

Previously, faucomte97 (Florian Aucomte) wrote…

Wanted to double check if receive_requests_until is in fact a required arg for creating a class. It looks like it is in the serializer, but are we planning to require teachers to provide this setting when creating a class? Default value currently is just "never" / "off"

It's not required though?


src/api/schoolTeacherInvitation.ts line 50 at r2 (raw file):

Previously, faucomte97 (Florian Aucomte) wrote…

add /accept

Done.


src/api/schoolTeacherInvitation.ts line 61 at r2 (raw file):

Previously, faucomte97 (Florian Aucomte) wrote…

add /reject

Done.


src/api/user.ts line 52 at r2 (raw file):

Previously, faucomte97 (Florian Aucomte) wrote…

should this invalidate tags too?

I don't think so.
When you list or retrieve users, they won't be included/excluded from the queryset depending on whether they have verified or not.

Copy link
Contributor

@faucomte97 faucomte97 left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 2 of 2 files at r3, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions

Copy link
Contributor

@faucomte97 faucomte97 left a comment

Choose a reason for hiding this comment

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

Reviewable status: all files reviewed, 1 unresolved discussion

@SKairinos SKairinos merged commit 6ea918c into development Jun 4, 2024
6 of 9 checks passed
@SKairinos SKairinos deleted the api branch June 4, 2024 15:51
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