From 12b219bf45bf65aed5b575721ae3369409b1d2f0 Mon Sep 17 00:00:00 2001
From: Sam Therapy <sam@samtherapy.net>
Date: Mon, 6 Feb 2023 15:34:17 +0100
Subject: [PATCH] Small nitpicks

gitignore: add default zones directory
upload: fix typo in swagger docs
config: simplify default save location
Signed-off-by: Sam Therapy <sam@samtherapy.net>
---
 .gitignore           | 4 +++-
 config.sample.yaml   | 2 +-
 docs/docs.go         | 5 ++---
 docs/swagger.json    | 2 +-
 docs/swagger.yaml    | 2 +-
 internal/api/zone.go | 2 +-
 6 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/.gitignore b/.gitignore
index 6c5e775..c2f184e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -26,4 +26,6 @@ test.db
 test.sqlite
 pomme.sqlite
 .dccache
-config.yaml
\ No newline at end of file
+config.yaml
+
+zones/*
\ No newline at end of file
diff --git a/config.sample.yaml b/config.sample.yaml
index 2875fb6..15c7b66 100644
--- a/config.sample.yaml
+++ b/config.sample.yaml
@@ -3,4 +3,4 @@ hashingsecret: PasswordHashingSecret
 port: 3008 # port the server runs on
 db: pomme.sqlite
 testdb: test.sqlite
-zonedir: /home/user/pomme/nds/pomme/zones
\ No newline at end of file
+zonedir: zones
\ No newline at end of file
diff --git a/docs/docs.go b/docs/docs.go
index aeb6391..22f2570 100644
--- a/docs/docs.go
+++ b/docs/docs.go
@@ -1,5 +1,4 @@
-// Package docs GENERATED BY SWAG; DO NOT EDIT
-// This file was generated by swaggo/swag
+// Code generated by swaggo/swag. DO NOT EDIT
 package docs
 
 import "github.com/swaggo/swag"
@@ -69,7 +68,7 @@ const docTemplate = `{
                         "Bearer": []
                     }
                 ],
-                "description": "Upload takes a multipart form file as user input. It must not exceede 1 mb and must be of text/plain content type.\nIf a file uploads successfully it will be saved locally and parsed.\nIf parsing is successful pomme will save the file to your ZoneDir defined in your config.\nUploads are associated with a specific user.\nRate limited: 10 requests every 10 second\nyou must specify \"Bearer\" before entering your token",
+                "description": "Upload takes a multipart form file as user input. It must not exceed 1 mb and must be of text/plain content type.\nIf a file uploads successfully it will be saved locally and parsed.\nIf parsing is successful pomme will save the file to your ZoneDir defined in your config.\nUploads are associated with a specific user.\nRate limited: 10 requests every 10 second\nyou must specify \"Bearer\" before entering your token",
                 "consumes": [
                     "multipart/form-data"
                 ],
diff --git a/docs/swagger.json b/docs/swagger.json
index fc04d4b..3a83f84 100644
--- a/docs/swagger.json
+++ b/docs/swagger.json
@@ -60,7 +60,7 @@
                         "Bearer": []
                     }
                 ],
-                "description": "Upload takes a multipart form file as user input. It must not exceede 1 mb and must be of text/plain content type.\nIf a file uploads successfully it will be saved locally and parsed.\nIf parsing is successful pomme will save the file to your ZoneDir defined in your config.\nUploads are associated with a specific user.\nRate limited: 10 requests every 10 second\nyou must specify \"Bearer\" before entering your token",
+                "description": "Upload takes a multipart form file as user input. It must not exceed 1 mb and must be of text/plain content type.\nIf a file uploads successfully it will be saved locally and parsed.\nIf parsing is successful pomme will save the file to your ZoneDir defined in your config.\nUploads are associated with a specific user.\nRate limited: 10 requests every 10 second\nyou must specify \"Bearer\" before entering your token",
                 "consumes": [
                     "multipart/form-data"
                 ],
diff --git a/docs/swagger.yaml b/docs/swagger.yaml
index 7a4e7b2..3e804b4 100644
--- a/docs/swagger.yaml
+++ b/docs/swagger.yaml
@@ -55,7 +55,7 @@ paths:
       consumes:
       - multipart/form-data
       description: |-
-        Upload takes a multipart form file as user input. It must not exceede 1 mb and must be of text/plain content type.
+        Upload takes a multipart form file as user input. It must not exceed 1 mb and must be of text/plain content type.
         If a file uploads successfully it will be saved locally and parsed.
         If parsing is successful pomme will save the file to your ZoneDir defined in your config.
         Uploads are associated with a specific user.
diff --git a/internal/api/zone.go b/internal/api/zone.go
index 8283c65..99b3e2b 100644
--- a/internal/api/zone.go
+++ b/internal/api/zone.go
@@ -17,7 +17,7 @@ import (
 // Upload godoc
 //
 //	@Summary		upload a zonefile
-//	@Description	Upload takes a multipart form file as user input. It must not exceede 1 mb and must be of text/plain content type.
+//	@Description	Upload takes a multipart form file as user input. It must not exceed 1 mb and must be of text/plain content type.
 //	@Description	If a file uploads successfully it will be saved locally and parsed.
 //	@Description	If parsing is successful pomme will save the file to your ZoneDir defined in your config.
 //	@Description	Uploads are associated with a specific user.
