Questions
This commit is contained in:
parent
7dd13799e5
commit
590a346781
@ -137,8 +137,8 @@ class QuestionController extends Controller
|
||||
/**
|
||||
* @OA\Post(
|
||||
* path="/api/questions",
|
||||
* summary="Create a new question",
|
||||
* description="Store a new question in the system (only admin or creator).",
|
||||
* summary="Create a new question (only admin or creator)",
|
||||
* description="Store a new question in the system.",
|
||||
* tags={"Questions"},
|
||||
* security={{"bearerAuth":{}}},
|
||||
* @OA\RequestBody(
|
||||
@ -201,8 +201,8 @@ class QuestionController extends Controller
|
||||
/**
|
||||
* @OA\Put(
|
||||
* path="/api/questions/{id}",
|
||||
* summary="Update a question",
|
||||
* description="Update an existing question by ID (only admin or creator).",
|
||||
* summary="Update a question (only admin or creator)",
|
||||
* description="Update an existing question by ID.",
|
||||
* tags={"Questions"},
|
||||
* security={{"bearerAuth":{}}},
|
||||
* @OA\Parameter(
|
||||
@ -272,8 +272,8 @@ class QuestionController extends Controller
|
||||
/**
|
||||
* @OA\Delete(
|
||||
* path="/api/questions/{id}",
|
||||
* summary="Delete a question",
|
||||
* description="Delete a question by ID (only admin or creator).",
|
||||
* summary="Delete a question (only admin or creator)",
|
||||
* description="Delete a question by ID .",
|
||||
* tags={"Questions"},
|
||||
* security={{"bearerAuth":{}}},
|
||||
* @OA\Parameter(
|
||||
@ -308,7 +308,7 @@ class QuestionController extends Controller
|
||||
{
|
||||
$this->authorize('delete', $question);
|
||||
$question->delete();
|
||||
Log::writeLog("Question '" . $question->id . "' is deleted by " . $request->user()->username);
|
||||
Log::writeLog("Question '" . $question->title . "' is deleted by " . $request->user()->username);
|
||||
|
||||
return ['message' => 'The hitcount was deleted'];
|
||||
}
|
||||
|
||||
@ -1188,8 +1188,8 @@
|
||||
"tags": [
|
||||
"Questions"
|
||||
],
|
||||
"summary": "Create a new question",
|
||||
"description": "Store a new question in the system (only admin or creator).",
|
||||
"summary": "Create a new question (only admin or creator)",
|
||||
"description": "Store a new question in the system.",
|
||||
"operationId": "788d85763184ddf1b557afb040547f32",
|
||||
"requestBody": {
|
||||
"required": true,
|
||||
@ -1332,8 +1332,8 @@
|
||||
"tags": [
|
||||
"Questions"
|
||||
],
|
||||
"summary": "Update a question",
|
||||
"description": "Update an existing question by ID (only admin or creator).",
|
||||
"summary": "Update a question (only admin or creator)",
|
||||
"description": "Update an existing question by ID.",
|
||||
"operationId": "795b02e5ecdc23fd74f20e0671a40f8c",
|
||||
"parameters": [
|
||||
{
|
||||
@ -1448,8 +1448,8 @@
|
||||
"tags": [
|
||||
"Questions"
|
||||
],
|
||||
"summary": "Delete a question",
|
||||
"description": "Delete a question by ID (only admin or creator).",
|
||||
"summary": "Delete a question (only admin or creator)",
|
||||
"description": "Delete a question by ID .",
|
||||
"operationId": "b2cbd34337a604c75c8a94f1a6e2f252",
|
||||
"parameters": [
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user