Skip to content

Commit

Permalink
torrent request
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaomlove committed Apr 15, 2024
1 parent b55a014 commit 9ccb67d
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 0 deletions.
34 changes: 34 additions & 0 deletions app/Http/Requests/TorrentRequest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?php

namespace App\Http\Requests;

use Illuminate\Foundation\Http\FormRequest;

class TorrentRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
$user = $this->user();
return $user->uploadpos == "yes";
}

/**
* Get the validation rules that apply to the request.
*
* @return array<string, mixed>
*/
public function rules()
{
return [
"descr" => "required",
"type" => "required",
"name" => "required",
"file" => "required|file",
];
}
}
11 changes: 11 additions & 0 deletions resources/lang/en/exam.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,15 @@
'checkout_not_pass_message_content' => 'You did not complete the exam: :exam_name in time(:begin ~ :end), and your account has be banned!',
'ban_log_reason' => 'Not complete exam: :exam_name in time(:begin ~ :end)',
'ban_user_modcomment' => 'Due to not complete exam: :exam_name(:begin ~ :end), ban by system.',
'admin' => [
'list' => [
'page_title' => 'Exam List'
]
],
'recurring' => 'recurring',
'recurring_weekly' => 'once a week',
'recurring_monthly' => 'once a month',
'recurring_help' => 'If specified as periodic, the appraisal start time is the start time of the current cycle, and the end time is the end time of the current cycle, which is said to be the natural week/month. At the end of each cycle, if the user still meets the screening criteria, the user will be automatically assigned to the next cycle.' ,

'time_condition_invalid' => 'The time parameter does not make sense, there are and only one of three items: start time + end time / duration / recurring',
];
11 changes: 11 additions & 0 deletions resources/lang/zh_TW/exam.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,15 @@
'checkout_not_pass_message_content' => '你在規定時間內(:begin ~ :end)未完成考核::exam_name,賬號已被禁用。',
'ban_log_reason' => '未完成考核::exam_name(:begin ~ :end)',
'ban_user_modcomment' => '未完成考核: :exam_name(:begin ~ :end), 被系統禁用.',
'admin' => [
'list' => [
'page_title' => '考核列表'
]
],
'recurring' => '周期性',
'recurring_weekly' => '每周一次',
'recurring_monthly' => '每月一次',
'recurring_help' => '如果指定為周期性,考核開始時間為當前周期的開始時間,結束時間為當前周期的結束時間,這裏說的都是自然周/月。每個周期結束後,如果用戶仍然滿足篩選條件,會自動為用戶分配下個周期的任務。',

'time_condition_invalid' => '時間參數不合理,有且只有三項之一:開始時間+結束時間/時長/周期性',
];

0 comments on commit 9ccb67d

Please sign in to comment.