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

Add discord user search #13

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
Open

Conversation

LouiseMcMahon
Copy link
Contributor

@LouiseMcMahon LouiseMcMahon commented Feb 6, 2025

Description

  • Adds a route to add the discord bot to the discord server
  • Adds the ability to assign a discord user to a member

How has this been tested?

Manually and via unit tests

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Copy link

github-actions bot commented Feb 6, 2025

Diff Coverage

Diff: origin/main...HEAD, staged and unstaged changes

  • app/Console/Commands/PutDiscordMembersCommand.php (100%)
  • app/DiscordData/GuildMemberData.php (100%)
  • app/Http/Controllers/Admin/DiscordAdminController.php (100%)
  • app/Http/Controllers/API/DiscordUserSearchAPIController.php (100%)
  • app/Http/Middleware/PermissionMiddleware.php (90.0%): Missing lines 24
  • app/Http/Requests/DiscordUsers/DiscordUserSearchRequest.php (100%)
  • app/Jobs/PutDiscordMembersJob.php (100%)
  • app/Services/Discord/DiscordService.php (100%)

Summary

  • Total: 88 lines
  • Missing: 1 line
  • Coverage: 98%

app/Http/Middleware/PermissionMiddleware.php

  20             throw UnauthorizedException::notLoggedIn();
  21         }
  22 
  23         $permissions = is_array($permission)
! 24             ? $permission
  25             : explode('|', $permission);
  26 
  27         if (! $user->checkPermissions($permissions)) {
  28             throw UnauthorizedException::forPermissions($permissions);

@LouiseMcMahon LouiseMcMahon force-pushed the add-discord-user-search branch from e20ec08 to 7ba8c75 Compare February 6, 2025 17:28
@LouiseMcMahon LouiseMcMahon force-pushed the add-discord-user-search branch from e7dc9b0 to 5784516 Compare February 6, 2025 17:31
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.

1 participant