diff --git a/web/app/Helpers/COMHelper.php b/web/app/Helpers/COMHelper.php new file mode 100644 index 0000000..404f1cd --- /dev/null +++ b/web/app/Helpers/COMHelper.php @@ -0,0 +1,15 @@ +ip(); + $whitelistedIps = explode(';', WebsiteConfiguration::where('name', 'WhitelistedIPs')->first()->value); + + return in_array($ip, $whitelistedIps); + } + + public static function isAccessKeyValid($request) { + $accessKey = WebsiteConfiguration::where('name', 'ComputeServiceAccessKey')->first()->value; + + return ($request->header('AccessKey') == $accessKey); + } + + public static function hasAllAccess($request) { + if(COMHelper::isCOM()) return true; + if(GridHelper::isIpWhitelisted($request) && GridHelper::isAccessKeyValid($request)) return true; + + return false; + } +} diff --git a/web/app/Helpers/JSON.php b/web/app/Helpers/JSON.php new file mode 100644 index 0000000..9a6f6db --- /dev/null +++ b/web/app/Helpers/JSON.php @@ -0,0 +1,21 @@ +header('Content-Type', 'application/json'); + } +} diff --git a/web/app/Http/Controllers/AppSettings.php b/web/app/Http/Controllers/AppSettings.php new file mode 100644 index 0000000..6f3ea66 --- /dev/null +++ b/web/app/Http/Controllers/AppSettings.php @@ -0,0 +1,106 @@ + '', + 'Fast' => 'F', + 'Dynamic' => 'DF', + 'Synchronised' => 'SF' + ]; + + /** + * A list of flag types + * + * @var array + */ + protected $types = [ + 'Log' => 'Log', + 'Int' => 'Int', + 'String' => 'String', + 'Boolean' => 'Flag' + ]; + + /** + * Returns a JSON array with the error code and message. + * + * @return Response + */ + private function error($data, $code = 400) + { + return response(['errors' => [$data]], 400); + } + + /** + * Returns a JSON array of settings for the specified bucket. + * + * @param \Illuminate\Http\Request $request + * @param string $bucketName + * @return Response + */ + public function getBucket(Request $request, $bucketName) + { + $primaryBucket = Fbucket::where('name', $bucketName); + + if($primaryBucket->exists()) { + $primaryBucket = $primaryBucket->first(); + + $bucketIds = [ $primaryBucket->id ]; + $bucketIds = array_merge($bucketIds, json_decode($primaryBucket->inheritedGroupIds)); + + if($primaryBucket->protected == 1 && !GridHelper::hasAllAccess($request)) { + return $this->error([ + 'code' => 2, + 'message' => 'You do not have access to this bucket.' + ], 401); + } + + /* */ + + $flags = []; + + foreach($bucketIds as $bucket) { + $fflags = FFlag::where('bucketId', $bucket)->get(); + + foreach($fflags as $flag) { + $prefix = $this->prefixes[$flag->type]; + $dataType = $this->types[$flag->dataType]; + + $name = ''; + if($prefix != 'Unscoped') { + $name = ($prefix . $dataType); + } + + $name .= $flag->name; + + $flags[$name] = $flag->value; + } + } + + return JSON::EncodeResponse($flags); + } else { + return $this->error([ + 'code' => 1, + 'message' => 'The requested bucket does not exist.' + ]); + } + } + +} diff --git a/web/app/Http/Controllers/Controller.php b/web/app/Http/Controllers/Controller.php index 0b881b8..63bfe5c 100644 --- a/web/app/Http/Controllers/Controller.php +++ b/web/app/Http/Controllers/Controller.php @@ -12,9 +12,6 @@ use App\Models\Category; use App\Models\Post; use App\Models\Reply; use App\Models\Staff; -use App\Models\CatalogCategory; -use App\Models\Item; -use App\Models\Inventory; use Illuminate\Foundation\Auth\RegistersUsers; use Illuminate\Support\Facades\Hash; use Illuminate\Support\Facades\Validator; @@ -44,8 +41,6 @@ class Controller extends BaseController $array = $user->toArray(); $staff = Staff::where('user_id', $user->id)->first(); if ($staff) {$array['power'] = $staff->power_level;} - $array['bank'] = $user->bank; - $array['email'] = $user->email; return Response()->json(["data"=>$array]); break; case "fetchedUser": @@ -91,29 +86,6 @@ class Controller extends BaseController } - public function fetchCategoriesCatalog() { - - $categories = CatalogCategory::get(); - - return Response()->json(["categories"=>$categories]); - - } - - public function fetchCategoryCatalog($id) { - - $category = CatalogCategory::where('id', $id)->first(); - - if (!$category) {return Response()->json(false);} - - $items = $category->items()->orderBy('updated_at', 'desc')->paginate(25); - - foreach ($items as &$item) { - $item['creator'] = User::where('id', $item['creator_id'])->first(); - } - - return Response()->json(["data"=>$category, "items"=>$items]); - } - public function fetchCategory($id) { $category = Category::where('id', $id)->first(); diff --git a/web/app/Models/CatalogCategory.php b/web/app/Models/CatalogCategory.php deleted file mode 100644 index 588671a..0000000 --- a/web/app/Models/CatalogCategory.php +++ /dev/null @@ -1,20 +0,0 @@ -morphMany('App\Models\Item', 'category'); - } - -} diff --git a/web/app/Models/FFlag.php b/web/app/Models/FFlag.php index 40701e2..e1ef304 100644 --- a/web/app/Models/FFlag.php +++ b/web/app/Models/FFlag.php @@ -7,5 +7,19 @@ use Illuminate\Database\Eloquent\Model; class FFlag extends Model { + /** + * The database connection that should be used by the migration. + * + * @var string + */ + protected $connection = 'mysql-fflag'; + + /** + * The table associated with the model. + * + * @var string + */ + protected $table = 'fflags'; + use HasFactory; } diff --git a/web/app/Models/FastGroup.php b/web/app/Models/FastGroup.php deleted file mode 100644 index b2041d7..0000000 --- a/web/app/Models/FastGroup.php +++ /dev/null @@ -1,11 +0,0 @@ -belongsTo(Item::class); - } - -} diff --git a/web/app/Models/Item.php b/web/app/Models/Item.php deleted file mode 100644 index 935f698..0000000 --- a/web/app/Models/Item.php +++ /dev/null @@ -1,15 +0,0 @@ -id)->first(); return $staff; } - - public function inventory() { - return $this->morphMany('App\Models\Inventory', 'owner'); - } } diff --git a/web/app/Providers/RouteServiceProvider.php b/web/app/Providers/RouteServiceProvider.php index 06bc747..a0e24fe 100644 --- a/web/app/Providers/RouteServiceProvider.php +++ b/web/app/Providers/RouteServiceProvider.php @@ -45,6 +45,11 @@ class RouteServiceProvider extends ServiceProvider ->namespace($this->namespace) ->group(base_path('routes/apis.php')); + Route::domain('clientsettings.api.' . env('APP_URL')) + ->middleware('api') + ->namespace($this->namespace) + ->group(base_path('routes/appsettings.php')); + Route::domain('impulse.' . env('APP_URL')) ->middleware('admin') ->namespace($this->namespace) diff --git a/web/config/database.php b/web/config/database.php index 66d8670..a8f2466 100644 --- a/web/config/database.php +++ b/web/config/database.php @@ -15,7 +15,7 @@ return [ | */ - 'default' => env('DB_CONNECTION', 'mysql'), + 'default' => env('DB_CONNECTION', 'mysql-primary'), /* |-------------------------------------------------------------------------- @@ -38,17 +38,37 @@ return [ 'sqlite' => [ 'driver' => 'sqlite', 'url' => env('DATABASE_URL'), - 'database' => env('DB_DATABASE', database_path('database.sqlite')), + 'database' => env('DB_PRIMARY_DATABASE', database_path('database.sqlite')), 'prefix' => '', 'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true), ], - 'mysql' => [ + 'mysql-primary' => [ 'driver' => 'mysql', 'url' => env('DATABASE_URL'), 'host' => env('DB_HOST', '127.0.0.1'), 'port' => env('DB_PORT', '3306'), - 'database' => env('DB_DATABASE', 'forge'), + 'database' => env('DB_PRIMARY_DATABASE', 'forge'), + 'username' => env('DB_USERNAME', 'forge'), + 'password' => env('DB_PASSWORD', ''), + 'unix_socket' => env('DB_SOCKET', ''), + 'charset' => 'utf8mb4', + 'collation' => 'utf8mb4_unicode_ci', + 'prefix' => '', + 'prefix_indexes' => true, + 'strict' => true, + 'engine' => null, + 'options' => extension_loaded('pdo_mysql') ? array_filter([ + PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'), + ]) : [], + ], + + 'mysql-fflag' => [ + 'driver' => 'mysql', + 'url' => env('DATABASE_URL'), + 'host' => env('DB_HOST', '127.0.0.1'), + 'port' => env('DB_PORT', '3306'), + 'database' => env('DB_FFLAG_DATABASE', 'forge'), 'username' => env('DB_USERNAME', 'forge'), 'password' => env('DB_PASSWORD', ''), 'unix_socket' => env('DB_SOCKET', ''), @@ -68,7 +88,7 @@ return [ 'url' => env('DATABASE_URL'), 'host' => env('DB_HOST', '127.0.0.1'), 'port' => env('DB_PORT', '5432'), - 'database' => env('DB_DATABASE', 'forge'), + 'database' => env('DB_PRIMARY_DATABASE', 'forge'), 'username' => env('DB_USERNAME', 'forge'), 'password' => env('DB_PASSWORD', ''), 'charset' => 'utf8', @@ -83,7 +103,7 @@ return [ 'url' => env('DATABASE_URL'), 'host' => env('DB_HOST', 'localhost'), 'port' => env('DB_PORT', '1433'), - 'database' => env('DB_DATABASE', 'forge'), + 'database' => env('DB_PRIMARY_DATABASE', 'forge'), 'username' => env('DB_USERNAME', 'forge'), 'password' => env('DB_PASSWORD', ''), 'charset' => 'utf8', diff --git a/web/database/migrations/2021_12_15_224204_create_fflags_table.php b/web/database/migrations/2021_12_15_224204_create_fflags_table.php index 6ba9868..d460fae 100644 --- a/web/database/migrations/2021_12_15_224204_create_fflags_table.php +++ b/web/database/migrations/2021_12_15_224204_create_fflags_table.php @@ -6,6 +6,13 @@ use Illuminate\Support\Facades\Schema; class CreateFflagsTable extends Migration { + /** + * The database connection that should be used by the migration. + * + * @var string + */ + protected $connection = 'mysql-fflag'; + /** * Run the migrations. * @@ -19,7 +26,7 @@ class CreateFflagsTable extends Migration $table->string('value'); $table->enum('dataType', ['Log', 'Int', 'String', 'Boolean']); $table->enum('type', ['Unscoped', 'Fast', 'Dynamic', 'Synchronised']); - $table->bigInteger('groupId'); + $table->bigInteger('bucketId'); $table->timestamps(); }); } diff --git a/web/database/migrations/2021_12_16_011849_create_users_table.php b/web/database/migrations/2021_12_16_011849_create_users_table.php index 3dd6eb8..f91f29d 100644 --- a/web/database/migrations/2021_12_16_011849_create_users_table.php +++ b/web/database/migrations/2021_12_16_011849_create_users_table.php @@ -20,7 +20,6 @@ class CreateUsersTable extends Migration $table->timestamp('email_verified_at')->default(null); $table->string('password'); $table->string('token'); - $table->integer('bank')->default(150); $table->string('about')->default(null); $table->timestamps(); }); diff --git a/web/database/migrations/2021_12_16_011850_create_fastgroups_table.php b/web/database/migrations/2021_12_16_011850_create_fbuckets_table.php similarity index 66% rename from web/database/migrations/2021_12_16_011850_create_fastgroups_table.php rename to web/database/migrations/2021_12_16_011850_create_fbuckets_table.php index 98339ba..08a0141 100644 --- a/web/database/migrations/2021_12_16_011850_create_fastgroups_table.php +++ b/web/database/migrations/2021_12_16_011850_create_fbuckets_table.php @@ -4,8 +4,15 @@ use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -class CreateFastgroupsTable extends Migration +class CreateFbucketsTable extends Migration { + /** + * The database connection that should be used by the migration. + * + * @var string + */ + protected $connection = 'mysql-fflag'; + /** * Run the migrations. * @@ -13,7 +20,7 @@ class CreateFastgroupsTable extends Migration */ public function up() { - Schema::create('fastgroups', function (Blueprint $table) { + Schema::create('fbuckets', function (Blueprint $table) { $table->id(); $table->string('name'); $table->boolean('protected')->default(false); @@ -29,6 +36,6 @@ class CreateFastgroupsTable extends Migration */ public function down() { - Schema::dropIfExists('fastgroups'); + Schema::dropIfExists('fbuckets'); } } diff --git a/web/database/migrations/2022_03_23_215614_create_items_table.php b/web/database/migrations/2022_03_23_215614_create_items_table.php deleted file mode 100644 index ce26c93..0000000 --- a/web/database/migrations/2022_03_23_215614_create_items_table.php +++ /dev/null @@ -1,40 +0,0 @@ -id(); - $table->string('title'); - $table->string('description'); - $table->string('thumbnail'); - $table->integer('creator_id'); - $table->integer('starting_price')->default(5); - $table->integer('current_price')->default(5); - $table->integer('category_id')->default(1); - $table->string('category_type'); - //may need to add more later idk. - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('items'); - } -} diff --git a/web/database/migrations/2022_03_23_215624_create_inventories_table.php b/web/database/migrations/2022_03_23_215624_create_inventories_table.php deleted file mode 100644 index 00387e9..0000000 --- a/web/database/migrations/2022_03_23_215624_create_inventories_table.php +++ /dev/null @@ -1,36 +0,0 @@ -id(); - $table->string('item_id'); - $table->string('owner_id'); - $table->string('owner_type'); - $table->string('uid'); //unique id | used for limiteds, the original id of the inventory row. once set, it never changes - $table->boolean('status')->default(true); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('inventories'); - } -} diff --git a/web/database/migrations/2022_03_23_215847_create_catalog_categories_table.php b/web/database/migrations/2022_03_23_215847_create_catalog_categories_table.php deleted file mode 100644 index c0c259c..0000000 --- a/web/database/migrations/2022_03_23_215847_create_catalog_categories_table.php +++ /dev/null @@ -1,33 +0,0 @@ -id(); - $table->string('title'); - $table->string('description'); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('catalog_categories'); - } -} diff --git a/web/database/seeders/FFlagSeeder.php b/web/database/seeders/FFlagSeeder.php index 4b02ad1..7a323e1 100644 --- a/web/database/seeders/FFlagSeeder.php +++ b/web/database/seeders/FFlagSeeder.php @@ -5,7 +5,7 @@ namespace Database\Seeders; use Illuminate\Database\Seeder; use App\Models\FFlag; -use App\Models\Fastgroup; +use App\Models\Fbucket; class FFlagSeeder extends Seeder { @@ -16,41 +16,41 @@ class FFlagSeeder extends Seeder */ public function run() { - $appSettingsCommon = Fastgroup::create([ + $appSettingsCommon = Fbucket::create([ 'name' => 'AppSettingsCommon', 'protected' => true ]); - $clientAppSettings = Fastgroup::create([ + $clientAppSettings = Fbucket::create([ 'name' => 'ClientAppSettings', 'inheritedGroupIds' => json_encode([ $appSettingsCommon->id ]) ]); - $cloudAppSettings = Fastgroup::create([ + $cloudAppSettings = Fbucket::create([ 'name' => 'CloudCompute', 'protected' => true, 'inheritedGroupIds' => json_encode([ $appSettingsCommon->id ]) ]); - $clientSharedSettings = Fastgroup::create([ + $clientSharedSettings = Fbucket::create([ 'name' => 'ClientSharedSettings' ]); - $arbiterAppSettings = Fastgroup::create([ + $arbiterAppSettings = Fbucket::create([ 'name' => 'Arbiter' ]); - $bootstrapperCommon = Fastgroup::create([ + $bootstrapperCommon = Fbucket::create([ 'name' => 'BootstrapperCommon', 'protected' => true ]); - $windowsBootstrapperSettings = Fastgroup::create([ + $windowsBootstrapperSettings = Fbucket::create([ 'name' => 'WindowsBootstrapperSettings', 'inheritedGroupIds' => json_encode([ $bootstrapperCommon->id ]) ]); - $windowsStudioBootstrapperSettings = Fastgroup::create([ + $windowsStudioBootstrapperSettings = Fbucket::create([ 'name' => 'WindowsStudioBootstrapperSettings', 'inheritedGroupIds' => json_encode([ $bootstrapperCommon->id ]) ]); diff --git a/web/database/seeders/WebConfigurationSeeder.php b/web/database/seeders/WebConfigurationSeeder.php index d3021d7..e70fa28 100644 --- a/web/database/seeders/WebConfigurationSeeder.php +++ b/web/database/seeders/WebConfigurationSeeder.php @@ -23,5 +23,15 @@ class WebConfigurationSeeder extends Seeder 'password' => '@bs0lut3lyM@55!v3P@55w0rd' ]) ]); // please please please please please please please change the default password + + WebsiteConfiguration::create([ + 'name' => 'ComputeServiceAccessKey', + 'value' => '92a6ac6b-7167-49b1-9ccd-079820ac892b' + ]); // change this as well + + WebsiteConfiguration::create([ + 'name' => 'WhitelistedIPs', + 'value' => '127.0.0.1' + ]); } } diff --git a/web/resources/js/components/Navbar.js b/web/resources/js/components/Navbar.js index aba49c0..ce7099e 100644 --- a/web/resources/js/components/Navbar.js +++ b/web/resources/js/components/Navbar.js @@ -51,16 +51,13 @@ const Navbar = (props) => { <> {props.user? -
-
Bank: ${props.user.bank}
-
  • - - -
  • -
    : Login / Sign up} +
  • + + +
  • : Login / Sign up} : null diff --git a/web/resources/js/layouts/App.js b/web/resources/js/layouts/App.js index 7735033..92c6667 100644 --- a/web/resources/js/layouts/App.js +++ b/web/resources/js/layouts/App.js @@ -35,7 +35,6 @@ import CreatePost from '../pages/CreatePost.js'; import CreateReply from '../pages/CreateReply.js'; import Settings from '../pages/Settings.js'; import User from '../pages/User.js'; -import Catalog from '../pages/Catalog.js'; axios.defaults.withCredentials = true @@ -156,14 +155,6 @@ const App = () => { - - - - - - - - diff --git a/web/resources/js/pages/Catalog.js b/web/resources/js/pages/Catalog.js deleted file mode 100644 index 15c1b3e..0000000 --- a/web/resources/js/pages/Catalog.js +++ /dev/null @@ -1,131 +0,0 @@ -// © XlXi 2021 -// Graphictoria 5 - -import axios from 'axios'; -import React, { useEffect, useState } from "react"; -import { Link, useHistory, useParams } from "react-router-dom"; - -import Config from '../config.js'; - -import SetTitle from "../Helpers/Title.js"; - -import Loader from '../Components/Loader.js'; - -import { GenericErrorModal } from './Errors.js'; -import { Card, CardTitle } from '../Layouts/Card.js'; -import { paginate } from '../helpers/utils.js'; -import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; - -var url = Config.BaseUrl.replace('http://', ''); -var protocol = Config.Protocol; - -const Catalog = (props) => { - - var id = useParams().id; - const [state, setState] = useState({offline: false, loading: true}); - const [categories, setCategoires] = useState([]); - const [category, setCategory] = useState([]); - const [items, setItems] = useState({items: [], currentPage: 1, meta: []}); - const user = props.user; - - if (!id) id = 1; - - const fetchCategories = async () => { - await axios.get(`${protocol}apis.${url}/fetch/categories/catalog`, {headers: {"X-Requested-With":"XMLHttpRequest"}}).then(data=>{ - setCategoires(data.data.categories); - }).catch(error=>{console.log(error);}); - } - - const fetchCategory = async () => { - await axios.get(`${protocol}apis.${url}/fetch/category/catalog/${id}?page=${items.currentPage}`, {headers: {"X-Requested-With":"XMLHttpRequest"}}).then(data=>{ - if (!data.data) {window.location.href=`/forum`;return;} - setCategory(data.data.data); - setItems({...items, items: data.data.items.data, meta: data.data.items}); - }).catch(error=>{console.log(error);}); - } - - const paginateitems = async (decision) => { - paginate(decision, items.currentPage, items.meta).then(res=>{ - switch(res){ - case "increase": - setItems({...items, currentPage: items.currentPage+1}); - break; - case "decrease": - setItems({...items, currentPage: items.currentPage-1}); - break; - default: - break; - } - }).catch(error=>console.log(error)); - } - - useEffect(async ()=>{ - SetTitle(`Catalog`); - await fetchCategory(); - await fetchCategories(); - setState({...state, loading: false}); - }, []); - - useEffect(async()=>{ - setState({...state, loading: true}); - await fetchCategory(); - setState({...state, loading: false}); - }, [items.currentPage]); - - return ( - state.loading || categories.length <= 0 - ? - - : -
    -
    -
    -
    -
    -

    Categories:

    - {categories.map(category=>( - <> - {category.title}
    - - ))} -
    -
    -
    -

    Options:

    -
    -
    Search for an item:
    - -
    -
    -
    -
    - {items.items.length <= 0 ?

    There are currently no items!

    : null} -
    - {items.items.map(item=>( - <> - -
    - [Thumbnail.] -
    -
    -
    {item.title}
    -
    -

    ${item.current_price}

    -
    -
    - - - ))} -
    - {items.items.length >= 1? -
    - {items.currentPage >= 2? : null} - {items.currentPage < items.meta.last_page? : null} -
    : null} -
    -
    -
    - ); -} - -export default Catalog; diff --git a/web/resources/js/pages/Forum.js b/web/resources/js/pages/Forum.js index 001c140..d5d1a1a 100644 --- a/web/resources/js/pages/Forum.js +++ b/web/resources/js/pages/Forum.js @@ -73,7 +73,7 @@ const Forum = (props) => { }, [posts.currentPage]); return ( - state.loading || categories.length <= 0 + state.loading ? : diff --git a/web/resources/js/pages/Settings.js b/web/resources/js/pages/Settings.js index 3647fe5..c752109 100644 --- a/web/resources/js/pages/Settings.js +++ b/web/resources/js/pages/Settings.js @@ -68,8 +68,8 @@ const Settings = (props) => {
    {validity.error? -
    -
    +
    +

    {validity.message}

    diff --git a/web/resources/sass/Graphictoria.scss b/web/resources/sass/Graphictoria.scss index 143fa64..65ce360 100644 --- a/web/resources/sass/Graphictoria.scss +++ b/web/resources/sass/Graphictoria.scss @@ -330,7 +330,6 @@ html { .graphictoria-nav-splitter { margin-top: 16px; - margin-bottom: 16px !important; } .graphictoria-search, #graphictoria-search-dropdown { @@ -929,34 +928,10 @@ p { margin: 0px !important; } -.fs10 { - font-size: 10px !important; -} - -.fs11 { - font-size: 11px !important; -} - .fs12 { font-size: 12px !important; } -.fs13 { - font-size: 13px !important; -} - -.fs14 { - font-size: 14px !important; -} - -.fs15 { - font-size: 15px !important; -} - -.fs16 { - font-size: 16px !important; -} - .padding-none { padding: 0px !important } @@ -981,26 +956,6 @@ p { margin-bottom: 15px !important; } -.mb-5 { - margin-bottom: 5px !important; -} - -.mt-5 { - margin-bottom: 5px !important; -} - -.mb-10 { - margin-bottom: 10px !important; -} - -.mt-10 { - margin-bottom: 10px !important; -} - -::marker { - display: none !important; -} - .graphic-post { padding: 1rem 1rem; text-align: start; @@ -1013,18 +968,6 @@ p { align-items: center !important; } -.graphic-post-column { - padding: 1rem 1rem; - text-align: start; - color: inherit !important; - text-decoration: none !important; - background-color: #222 !important; - border-radius: 0.25px; - display: flex; - flex-direction: column; - align-items: center !important; -} - .error-dialog { padding: 5px; margin-bottom: 10px; diff --git a/web/routes/apis.php b/web/routes/apis.php index bb80f0c..b720633 100644 --- a/web/routes/apis.php +++ b/web/routes/apis.php @@ -31,10 +31,6 @@ Route::get('/fetch/categories', 'Controller@fetchCategories'); Route::post('/fetch/categories/post', 'Controller@fetchCategoriesFP'); -Route::get('/fetch/categories/catalog', 'Controller@fetchCategoriesCatalog'); - -Route::get('/fetch/category/catalog/{id}', 'Controller@fetchCategoryCatalog'); - Route::get('/fetch/category/{id}', 'Controller@fetchCategory'); Route::get('/fetch/posts/{id}', 'Controller@fetchPosts'); diff --git a/web/routes/appsettings.php b/web/routes/appsettings.php new file mode 100644 index 0000000..a33712a --- /dev/null +++ b/web/routes/appsettings.php @@ -0,0 +1,28 @@ +header('Cache-Control', 'private') + ->header('Content-Type', 'application/json; charset=utf-8'); +}); \ No newline at end of file