-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[36] - Implementar endpoint Follow streamer (#44)
* [36] - Arreglar conflictos * [36] - Arreglar conflictos DBClient * [0] - Refactorizar servicios con streamers * [36] - Arreglar conflictos migraciones usuario * [36] - Crear excepciones forbidden y unauthorized * [36] - Implementado error get token * [36] - Devolver mensajes excepcionesd desde controller * [36] - Añadir follow a routes * [36] - Modificar streamerId a string en usuario_streamers * [36] - Añadir excepcion para manejar error not found * [36] - Manejar errores desde controlador * [36] - Eliminar metodo innecesario post en ApiClient * [36] - Refactorizar DBClient * [36] - Refactorizar follow streamer manager * [36] - Implementar request con username y streamerId * [36] - Implementar metodos database y devolver errores en excepciones * [36] - Manejar mensajes excepciones desde fuera del controller * [36] - Refactorizar FollowStreamerManager * [36] - Implementar tests de integracion * [36] - Implementar tests unitarios * [36] - Eliminar endpoint desactualizado de /users en /follow --------- Co-authored-by: Santi Ayechu <santiayechu@gmail.com>
- Loading branch information
1 parent
ee7ddd6
commit bd6297e
Showing
19 changed files
with
1,094 additions
and
402 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?php | ||
|
||
namespace App\Exceptions; | ||
|
||
use Exception; | ||
|
||
class ForbiddenException extends Exception | ||
{ | ||
|
||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?php | ||
|
||
namespace App\Exceptions; | ||
|
||
use Exception; | ||
|
||
class NotFoundException extends Exception | ||
{ | ||
|
||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?php | ||
|
||
namespace App\Exceptions; | ||
|
||
use Exception; | ||
|
||
class UnauthorizedException extends Exception | ||
{ | ||
|
||
} | ||
|
42 changes: 0 additions & 42 deletions
42
app/Infrastructure/CreateUser/AnalyticsCreateUserController.php
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
app/Infrastructure/FollowStreamer/AnalyticsFollowStreamerRequest.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?php | ||
|
||
namespace App\Infrastructure\FollowStreamer; | ||
|
||
use Illuminate\Foundation\Http\FormRequest; | ||
|
||
class AnalyticsFollowStreamerRequest extends FormRequest | ||
{ | ||
public function authorize(): bool | ||
{ | ||
return true; | ||
} | ||
|
||
public function rules(): array | ||
{ | ||
return [ | ||
'username' => 'required|string', | ||
'streamerId' => 'required|numeric', | ||
]; | ||
} | ||
|
||
public function messages() | ||
{ | ||
return [ | ||
'username.required' => 'El username es obligatorio', | ||
'username.string' => 'El username debe ser una cadena de texto', | ||
'streamerId.required' => 'El streamerId es obligatorio', | ||
'streamerId.numeric' => 'El streamerId debe ser un número', | ||
]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.