aboutsummaryrefslogtreecommitdiff
path: root/backend/db/db.go
diff options
context:
space:
mode:
Diffstat (limited to 'backend/db/db.go')
-rw-r--r--backend/db/db.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/backend/db/db.go b/backend/db/db.go
index df112d0..258b4df 100644
--- a/backend/db/db.go
+++ b/backend/db/db.go
@@ -28,7 +28,7 @@ const TitleLimit = 100
const ContentLimit = 100000
// creates a new paste with title, content and hash, returns the hash of the created paste
-func New(ip, content, expiry, title, password string) (string, error) {
+func New(ip, content, expiry, title, password, lang string) (string, error) {
// generate hash from ip
hash := security.GenerateURI(ip)
@@ -40,9 +40,10 @@ func New(ip, content, expiry, title, password string) (string, error) {
// create new struct
new := Paste{
- Hash: hash,
- Content: content,
- Title: title,
+ Hash: hash,
+ Content: content,
+ Title: title,
+ Language: lang,
}
// if there is a password, encrypt content and hash the password