mirror of
				https://github.com/shlinkio/shlink.git
				synced 2025-02-25 18:45:27 -06:00 
			
		
		
		
	Fixed date format returned by the API
This commit is contained in:
		@@ -1,7 +1,7 @@
 | 
			
		||||
<?php
 | 
			
		||||
namespace PHPSTORM_META;
 | 
			
		||||
 | 
			
		||||
use Interop\Container\ContainerInterface;
 | 
			
		||||
use Psr\Container\ContainerInterface;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * PhpStorm Container Interop code completion
 | 
			
		||||
 
 | 
			
		||||
@@ -25,6 +25,11 @@
 | 
			
		||||
                            "description": "The authentication token that needs to be sent in the Authorization header"
 | 
			
		||||
                        }
 | 
			
		||||
                    }
 | 
			
		||||
                },
 | 
			
		||||
                "examples": {
 | 
			
		||||
                    "application/json": {
 | 
			
		||||
                        "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9.TJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ"
 | 
			
		||||
                    }
 | 
			
		||||
                }
 | 
			
		||||
            },
 | 
			
		||||
            "400": {
 | 
			
		||||
 
 | 
			
		||||
@@ -68,6 +68,28 @@
 | 
			
		||||
                            }
 | 
			
		||||
                        }
 | 
			
		||||
                    }
 | 
			
		||||
                },
 | 
			
		||||
                "examples": {
 | 
			
		||||
                    "application/json": {
 | 
			
		||||
                        "shortUrls": {
 | 
			
		||||
                            "data": [
 | 
			
		||||
                                {
 | 
			
		||||
                                    "shortCode": "",
 | 
			
		||||
                                    "originalUrl": "https://store.steampowered.com",
 | 
			
		||||
                                    "dateCreated": "2016-08-21T20:34:16+02:00",
 | 
			
		||||
                                    "visitsCount": 328,
 | 
			
		||||
                                    "tags": [
 | 
			
		||||
                                        "games",
 | 
			
		||||
                                        "tech"
 | 
			
		||||
                                    ]
 | 
			
		||||
                                }
 | 
			
		||||
                            ],
 | 
			
		||||
                            "pagination": {
 | 
			
		||||
                                "currentPage": 5,
 | 
			
		||||
                                "pagesCount": 12
 | 
			
		||||
                            }
 | 
			
		||||
                        }
 | 
			
		||||
                    }
 | 
			
		||||
                }
 | 
			
		||||
            },
 | 
			
		||||
            "500": {
 | 
			
		||||
 
 | 
			
		||||
@@ -84,7 +84,7 @@ class ListKeysCommand extends Command
 | 
			
		||||
                $rowData[] = $this->{$formatMethod}($this->getEnabledSymbol($row));
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            $rowData[] = isset($expiration) ? $expiration->format(\DateTime::ISO8601) : '-';
 | 
			
		||||
            $rowData[] = isset($expiration) ? $expiration->format(\DateTime::ATOM) : '-';
 | 
			
		||||
            $table->addRow($rowData);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -176,7 +176,7 @@ class ShortUrl extends AbstractEntity implements \JsonSerializable
 | 
			
		||||
        return [
 | 
			
		||||
            'shortCode' => $this->shortCode,
 | 
			
		||||
            'originalUrl' => $this->originalUrl,
 | 
			
		||||
            'dateCreated' => isset($this->dateCreated) ? $this->dateCreated->format(\DateTime::ISO8601) : null,
 | 
			
		||||
            'dateCreated' => isset($this->dateCreated) ? $this->dateCreated->format(\DateTime::ATOM) : null,
 | 
			
		||||
            'visitsCount' => count($this->visits),
 | 
			
		||||
            'tags' => $this->tags->toArray(),
 | 
			
		||||
        ];
 | 
			
		||||
 
 | 
			
		||||
@@ -171,7 +171,7 @@ class Visit extends AbstractEntity implements \JsonSerializable
 | 
			
		||||
    {
 | 
			
		||||
        return [
 | 
			
		||||
            'referer' => $this->referer,
 | 
			
		||||
            'date' => isset($this->date) ? $this->date->format(\DateTime::ISO8601) : null,
 | 
			
		||||
            'date' => isset($this->date) ? $this->date->format(\DateTime::ATOM) : null,
 | 
			
		||||
            'remoteAddr' => $this->remoteAddr,
 | 
			
		||||
            'userAgent' => $this->userAgent,
 | 
			
		||||
            'visitLocation' => $this->visitLocation,
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user