public function sort(): ServiceResponse
    {
        $this->request->allowMethod('post');
        if (!empty($this->sortModelName) && !empty($this->request->getData('foreignKey'))) {
            $table = TableRegistry::getTableLocator()->get($this->sortModelName);
            $entity = $table->get($this->request->getData('foreignKey'));
            $entity->sort = $this->request->getData('sort');
            if ($table->save($entity)) {
                return new ServiceResponse(ApiReturnCode::SUCCESS, [
                    $entity->id,
                    $this->request->getData('sort'),
                ]);
            }

            return new ServiceResponse(ApiReturnCode::INTERNAL_ERROR, []);
        }
        throw new NotFoundException();
    }