Skip to content

Commit

Permalink
Remove deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
RMartinOscar committed Oct 25, 2024
1 parent f55d8e5 commit 62127c0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 30 deletions.
30 changes: 1 addition & 29 deletions app/Models/ApiKey.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,6 @@ class ApiKey extends Model
*/
public const RESOURCE_NAME = 'api_key';

/**
* Maximum number of Api keys that a user can have.
*
* @deprecated
*/
public const API_KEYS_LIMIT = 25;

/**
* Different API keys that can exist on the system.
*/
Expand All @@ -80,27 +73,6 @@ class ApiKey extends Model

public const TYPE_APPLICATION = 2;

/* @deprecated */
public const TYPE_DAEMON_USER = 3;

/* @deprecated */
public const TYPE_DAEMON_APPLICATION = 4;

/**
* The length of API key identifiers.
*
* @deprecated
*/
public const IDENTIFIER_LENGTH = 16;

/**
* The length of the actual API key that is encrypted and stored
* in the database.
*
* @deprecated
*/
public const KEY_LENGTH = 32;

public const RESOURCES = ['servers', 'nodes', 'allocations', 'users', 'eggs', 'database_hosts', 'server_databases', 'mounts'];

/**
Expand Down Expand Up @@ -148,7 +120,7 @@ class ApiKey extends Model
*/
public static array $validationRules = [
'user_id' => 'required|exists:users,id',
'key_type' => 'present|integer|min:0|max:4',
'key_type' => 'present|integer|min:0|max:2',
'identifier' => 'required|string|size:16|unique:api_keys,identifier',
'token' => 'required|string',
'memo' => 'required|nullable|string|max:500',
Expand Down
2 changes: 1 addition & 1 deletion app/Services/Nodes/NodeAutoDeployService.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public function handle(Request $request, Node $node, ?bool $docker = false): ?st
sprintf(
'%s wings configure --panel-url %s --token %s --node %d%s',
$docker ? 'docker compose exec -it' : 'sudo',
route('index'),
config('app.url'),
$token,
$node->id,
$request->isSecure() ? '' : ' --allow-insecure'
Expand Down

0 comments on commit 62127c0

Please sign in to comment.