<?php
// +----------------------------------------------------------------------
// | SentCMS [ WE CAN DO IT JUST THINK IT ]
// +----------------------------------------------------------------------
// | Copyright (c) 2024 http://www.tensent.cn All rights reserved.
// +----------------------------------------------------------------------
// | Author: molong <molong@tensent.cn> <http://www.tensent.cn>
// +----------------------------------------------------------------------
use Illuminate\Support\Facades\Route;
use Modules\Member\Controllers\MemberController;

Route::post('/member/login', [Modules\Member\Controllers\Api\Login::class, 'index'])->name('member.login');
Route::post('/member/register', [Modules\Member\Controllers\Api\Login::class, 'register'])->name('member.register');

Route::name('member.')->prefix('member')->middleware(['auth.check:api'])->group(function () {
	Route::get('/user', [Modules\Member\Controllers\Api\Login::class, 'user'])->name('user');
	Route::post('/logout', [Modules\Member\Controllers\Api\Login::class, 'logout'])->name('logout');

	Route::controller(Modules\Member\Controllers\Api\Index::class)->prefix('member')->name('member.')->group(function () {
		Route::get('/index', 'index')->name('index');
		Route::put('/edit', 'edit')->name('edit');
		Route::put('/editpasswd', 'editpasswd')->name('editpasswd');
	});

	Route::controller(Modules\Member\Controllers\Api\Extend::class)->prefix('extend')->name('extend.')->group(function () {
		Route::get('/index', 'index')->name('index');
		Route::get('/detail', 'detail')->name('detail');
		Route::get('/field', 'field')->name('field');
		Route::get('/level', 'level')->name('level');
		Route::post('/save', 'save')->name('save');
	});
});
