feat(note): add audio upload and sharing functionality
- Introduced `note_audio` table for storing audio attachments related to notes. - Implemented audio upload endpoint in `Note` controller to handle audio file uploads. - Added sharing functionality with `note_share` table to manage share tokens and view counts. - Updated API routes to include endpoints for audio uploads and share creation. - Enhanced documentation to reflect new audio and sharing features.
This commit is contained in:
@@ -10,6 +10,7 @@ use app\note\controller\v1\Ai as NoteAi;
|
||||
use app\note\controller\v1\Auth as NoteAuth;
|
||||
use app\note\controller\v1\Meta as NoteMeta;
|
||||
use app\note\controller\v1\Note as NoteItem;
|
||||
use app\note\controller\v1\Share as NoteShare;
|
||||
|
||||
/**
|
||||
* 全局路由入口。
|
||||
@@ -54,6 +55,7 @@ Route::group('api/v1/video-work', function () {
|
||||
Route::group('note/v1', function () {
|
||||
Route::get('meta/interfaces', [NoteMeta::class, 'interfaces']);
|
||||
Route::post('auth/wechat-login', [NoteAuth::class, 'wechatLogin']);
|
||||
Route::get('share/read/:token', [NoteShare::class, 'read']);
|
||||
});
|
||||
|
||||
// note v1 笔记小程序模块接口(需登录)
|
||||
@@ -66,7 +68,9 @@ Route::group('note/v1', function () {
|
||||
Route::post('item/update/:id', [NoteItem::class, 'update']);
|
||||
Route::post('item/delete/:id', [NoteItem::class, 'delete']);
|
||||
Route::post('item/transcript/:id', [NoteItem::class, 'transcript']);
|
||||
Route::post('item/audio/:id', [NoteItem::class, 'audio']);
|
||||
|
||||
Route::post('ai/summary/:id', [NoteAi::class, 'summary']);
|
||||
Route::get('ai/summary/:id', [NoteAi::class, 'readSummary']);
|
||||
Route::post('share/create/:id', [NoteShare::class, 'create']);
|
||||
})->middleware(\app\api\middleware\Auth::class);
|
||||
|
||||
Reference in New Issue
Block a user