Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions cmd/devices-api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,6 @@ func startWebAPI(logger zerolog.Logger, settings *config.Settings, pdb db.Store,
natsSvc, wallet, userDeviceSvc, teslaFleetAPISvc, ipfsSvc, chConn)
webhooksController := controllers.NewWebhooksController(settings, pdb.DBS, &logger, autoPiSvc, ddIntSvc)
documentsController := controllers.NewDocumentsController(settings, &logger, s3ServiceClient, pdb.DBS)
countriesController := controllers.NewCountriesController()
userIntegrationAuthController := controllers.NewUserIntegrationAuthController(settings, pdb.DBS, &logger, ddSvc, teslaFleetAPISvc, &tmpcred.Store{
Redis: redisCache,
Cipher: cipher,
Expand All @@ -166,9 +165,6 @@ func startWebAPI(logger zerolog.Logger, settings *config.Settings, pdb db.Store,
// Device Definitions
nftController := controllers.NewNFTController(settings, pdb.DBS, &logger, ddSvc, teslaTaskService, ddIntSvc, teslaOracle)

v1.Get("/countries", countriesController.GetSupportedCountries)
v1.Get("/countries/:countryCode", countriesController.GetCountry)

// webhooks, performs signature validation
v1.Post(constants.AutoPiWebhookPath, webhooksController.ProcessCommand)

Expand Down
82 changes: 0 additions & 82 deletions docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,59 +15,6 @@ const docTemplate = `{
"host": "{{.Host}}",
"basePath": "{{.BasePath}}",
"paths": {
"/countries": {
"get": {
"description": "Returns all the supported countries",
"produces": [
"application/json"
],
"tags": [
"countries"
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/github_com_DIMO-Network_devices-api_internal_constants.CountryInfo"
}
}
}
}
},
"/countries/{countryCode}": {
"get": {
"description": "Returns a specific country by 3-letter ISO country code",
"produces": [
"application/json"
],
"tags": [
"countries"
],
"parameters": [
{
"type": "string",
"description": "3-letter country code",
"name": "countryCode",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/github_com_DIMO-Network_devices-api_internal_constants.CountryInfo"
}
},
"400": {
"description": "invalid country code"
},
"404": {
"description": "country not found with that country code"
}
}
}
},
"/documents": {
"get": {
"security": [
Expand Down Expand Up @@ -1293,35 +1240,6 @@ const docTemplate = `{
"big.Int": {
"type": "object"
},
"github_com_DIMO-Network_devices-api_internal_constants.CountryInfo": {
"type": "object",
"properties": {
"alpha_2": {
"type": "string"
},
"alpha_3": {
"type": "string"
},
"lora_region": {
"type": "string"
},
"name": {
"type": "string"
},
"region": {
"type": "string"
},
"region_code": {
"type": "integer"
},
"sub_region": {
"type": "string"
},
"sub_region_code": {
"type": "integer"
}
}
},
"github_com_DIMO-Network_devices-api_internal_controllers_helpers.ErrorRes": {
"type": "object",
"properties": {
Expand Down
82 changes: 0 additions & 82 deletions docs/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,59 +7,6 @@
},
"basePath": "/v1",
"paths": {
"/countries": {
"get": {
"description": "Returns all the supported countries",
"produces": [
"application/json"
],
"tags": [
"countries"
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/github_com_DIMO-Network_devices-api_internal_constants.CountryInfo"
}
}
}
}
},
"/countries/{countryCode}": {
"get": {
"description": "Returns a specific country by 3-letter ISO country code",
"produces": [
"application/json"
],
"tags": [
"countries"
],
"parameters": [
{
"type": "string",
"description": "3-letter country code",
"name": "countryCode",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/github_com_DIMO-Network_devices-api_internal_constants.CountryInfo"
}
},
"400": {
"description": "invalid country code"
},
"404": {
"description": "country not found with that country code"
}
}
}
},
"/documents": {
"get": {
"security": [
Expand Down Expand Up @@ -1285,35 +1232,6 @@
"big.Int": {
"type": "object"
},
"github_com_DIMO-Network_devices-api_internal_constants.CountryInfo": {
"type": "object",
"properties": {
"alpha_2": {
"type": "string"
},
"alpha_3": {
"type": "string"
},
"lora_region": {
"type": "string"
},
"name": {
"type": "string"
},
"region": {
"type": "string"
},
"region_code": {
"type": "integer"
},
"sub_region": {
"type": "string"
},
"sub_region_code": {
"type": "integer"
}
}
},
"github_com_DIMO-Network_devices-api_internal_controllers_helpers.ErrorRes": {
"type": "object",
"properties": {
Expand Down
53 changes: 0 additions & 53 deletions docs/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,25 +42,6 @@ definitions:
type: object
big.Int:
type: object
github_com_DIMO-Network_devices-api_internal_constants.CountryInfo:
properties:
alpha_2:
type: string
alpha_3:
type: string
lora_region:
type: string
name:
type: string
region:
type: string
region_code:
type: integer
sub_region:
type: string
sub_region_code:
type: integer
type: object
github_com_DIMO-Network_devices-api_internal_controllers_helpers.ErrorRes:
properties:
code:
Expand Down Expand Up @@ -712,40 +693,6 @@ info:
title: DIMO Devices API
version: "1.0"
paths:
/countries:
get:
description: Returns all the supported countries
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/github_com_DIMO-Network_devices-api_internal_constants.CountryInfo'
tags:
- countries
/countries/{countryCode}:
get:
description: Returns a specific country by 3-letter ISO country code
parameters:
- description: 3-letter country code
in: path
name: countryCode
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/github_com_DIMO-Network_devices-api_internal_constants.CountryInfo'
"400":
description: invalid country code
"404":
description: country not found with that country code
tags:
- countries
/documents:
get:
consumes:
Expand Down
48 changes: 0 additions & 48 deletions internal/controllers/countries_controller.go

This file was deleted.

Loading