Skip to content

Commit

Permalink
Fix mail link (#138)
Browse files Browse the repository at this point in the history
* Update and delete translations

* Update email verification link

* Update phpunit config file
  • Loading branch information
mckenziearts authored Dec 27, 2023
1 parent d3df5c9 commit 171449e
Show file tree
Hide file tree
Showing 50 changed files with 163 additions and 4,201 deletions.
10 changes: 1 addition & 9 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -56,22 +56,14 @@ GITHUB_CLIENT_ID=
GITHUB_CLIENT_SECRET=
GITHUB_REDIRECT=${APP_URL}/auth/github/callback

TWITTER_CLIENT_ID=
TWITTER_CLIENT_SECRET=
TWITTER_REDIRECT=${APP_URL}/auth/twitter/callback
TWITTER_CONSUMER_KEY=
TWITTER_CONSUMER_SECRET=
TWITTER_ACCESS_TOKEN=
TWITTER_ACCESS_SECRET=

SLACK_WEBHOOK_URL=
SLACK_TEAM_NAME="Laravel Cameroun"
SLACK_API_TOKEN=
SLACK_TEAM_URL="https://laravelcm.slack.com"

MARKDOWNX_GIPHY_API_KEY=
TORCHLIGHT_TOKEN=
MIX_TORCHLIGHT_TOKEN="${TORCHLIGHT_TOKEN}"
TORCHLIGHT_THEME=moonlight-ii
UNSPLASH_ACCESS_KEY=

TELEGRAM_BOT_TOKEN=
Expand Down
4 changes: 2 additions & 2 deletions app/Events/CommentWasAdded.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
use App\Models\Reply;
use Illuminate\Queue\SerializesModels;

final class CommentWasAdded
final readonly class CommentWasAdded
{
use SerializesModels;

public function __construct(public readonly Reply $reply, public readonly Discussion $discussion)
public function __construct(public Reply $reply, public Discussion $discussion)
{
}
}
4 changes: 2 additions & 2 deletions app/Exceptions/CannotCreateUser.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ final class CannotCreateUser extends Exception
{
public static function duplicateEmailAddress(string $emailAddress): self
{
return new static("Cet adresse e-mail [{$emailAddress}] existe déjà.");
return new CannotCreateUser("Cet adresse e-mail [{$emailAddress}] existe déjà.");
}

public static function duplicateUsername(string $username): self
{
return new static("Ce pseudo [{$username}] existe déjà.");
return new CannotCreateUser("Ce pseudo [{$username}] existe déjà.");
}
}
4 changes: 2 additions & 2 deletions app/Models/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
use Illuminate\Support\Facades\Auth;
use Laravel\Sanctum\HasApiTokens;
use Laravel\Socialite\Contracts\User as SocialUser;
use Laravelcm\Subscriptions\Traits\HasPlanSubscriptions;
use LaravelFeature\Featurable\Featurable;
use LaravelFeature\Featurable\FeaturableInterface;
use QCod\Gamify\Gamify;
// use Rinvex\Subscriptions\Traits\HasPlanSubscriptions;
use Spatie\MediaLibrary\HasMedia;
use Spatie\MediaLibrary\InteractsWithMedia;
use Spatie\Permission\Traits\HasRoles;
Expand All @@ -41,7 +41,7 @@ final class User extends Authenticatable implements MustVerifyEmail, HasMedia, F
use Gamify;
use HasApiTokens;
use HasFactory;
// use HasPlanSubscriptions;
use HasPlanSubscriptions;
use HasProfilePhoto;
use HasRoles;
use HasSettings;
Expand Down
8 changes: 4 additions & 4 deletions app/Providers/EventServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ final class EventServiceProvider extends ServiceProvider
\SocialiteProviders\Twitter\TwitterExtendSocialite::class.'@handle',
],

ApiRegistered::class => [
SendCompanyEmailVerificationNotification::class,
SendWelcomeCompanyNotification::class,
],
// ApiRegistered::class => [
// SendCompanyEmailVerificationNotification::class,
// SendWelcomeCompanyNotification::class,
// ],

SponsoringPaymentInitialize::class => [
SendPaymentNotification::class,
Expand Down
14 changes: 11 additions & 3 deletions app/Providers/FortifyServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,24 @@ public function boot(): void
Fortify::loginView(fn () => view('auth.login'));
Fortify::registerView(fn () => view('auth.register'));
Fortify::requestPasswordResetLinkView(fn () => view('auth.forgot-password'));
Fortify::resetPasswordView(fn ($request) => view('auth.reset-password', ['request' => $request]));
Fortify::resetPasswordView(fn (Request $request) => view('auth.reset-password', ['request' => $request]));
Fortify::verifyEmailView(fn () => view('auth.verify-email'));

Fortify::createUsersUsing(CreateNewUser::class);
Fortify::updateUserProfileInformationUsing(UpdateUserProfileInformation::class);
Fortify::updateUserPasswordsUsing(UpdateUserPassword::class);
Fortify::resetUserPasswordsUsing(ResetUserPassword::class);

RateLimiter::for('login', fn (Request $request) => Limit::perMinute(5)->by($request->email.$request->ip()));
RateLimiter::for(
'login',
fn (Request $request) => Limit::perMinute(5)
->by($request->email.$request->ip())
);

RateLimiter::for('two-factor', fn (Request $request) => Limit::perMinute(5)->by($request->session()->get('login.id')));
RateLimiter::for(
'two-factor',
fn (Request $request) => Limit::perMinute(5)
->by($request->session()->get('login.id'))
);
}
}
8 changes: 4 additions & 4 deletions app/Providers/RouteServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ public function boot(): void
$this->routeBindings();

$this->routes(function (): void {
Route::prefix('api')
->middleware('api')
->namespace($this->namespace)
->group(base_path('routes/api.php'));
// Route::prefix('api')
// ->middleware('api')
// ->namespace($this->namespace)
// ->group(base_path('routes/api.php'));

Route::middleware('web')
->namespace($this->namespace)
Expand Down
5 changes: 4 additions & 1 deletion lang/en.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"The :attribute must be at least :length characters.": "The :attribute must be at least :length characters.",
"The given :attribute has appeared in a data leak. Please choose a different :attribute.": "The given :attribute has appeared in a data leak. Please choose a different :attribute."
"The given :attribute has appeared in a data leak. Please choose a different :attribute.": "The given :attribute has appeared in a data leak. Please choose a different :attribute.",
"Verify Email Address": "Verify Email Address",
"Please click the button below to verify your email address.": "Please click the button below to verify your email address.",
"If you did not create an account, no further action is required.": "If you did not create an account, no further action is required."
}
5 changes: 4 additions & 1 deletion lang/fr.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"The :attribute must be at least :length characters.": "Le champ :attribute doit contenir au moins :length caractères.",
"The given :attribute has appeared in a data leak. Please choose a different :attribute.": "Le champ :attribute donné est apparu dans une fuite de données. Veuillez choisir un autre :attribute."
"The given :attribute has appeared in a data leak. Please choose a different :attribute.": "Le champ :attribute donné est apparu dans une fuite de données. Veuillez choisir un autre :attribute.",
"Verify Email Address": "Vérifier l'adresse e-mail",
"Please click the button below to verify your email address.": "Veuillez cliquer sur le bouton ci-dessous pour vérifier votre adresse email.",
"If you did not create an account, no further action is required.": "Si vous n'avez pas créé de compte, aucune autre action n'est requise."
}
Loading

0 comments on commit 171449e

Please sign in to comment.