mirror of
https://github.com/thomiceli/opengist.git
synced 2025-07-14 03:41:51 +02:00
feat: default visibility (#155)
Signed-off-by: jolheiser <john.olheiser@gmail.com>
This commit is contained in:

committed by
Thomas Miceli

parent
943212e492
commit
246f12c8cb
@ -3,12 +3,13 @@ package web
|
||||
import (
|
||||
"crypto/md5"
|
||||
"fmt"
|
||||
"github.com/labstack/echo/v4"
|
||||
"github.com/thomiceli/opengist/internal/db"
|
||||
"golang.org/x/crypto/ssh"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/labstack/echo/v4"
|
||||
"github.com/thomiceli/opengist/internal/db"
|
||||
"golang.org/x/crypto/ssh"
|
||||
)
|
||||
|
||||
func userSettings(ctx echo.Context) error {
|
||||
@ -62,7 +63,7 @@ func accountDeleteProcess(ctx echo.Context) error {
|
||||
func sshKeysProcess(ctx echo.Context) error {
|
||||
user := getUserLogged(ctx)
|
||||
|
||||
var dto = new(db.SSHKeyDTO)
|
||||
dto := new(db.SSHKeyDTO)
|
||||
if err := ctx.Bind(dto); err != nil {
|
||||
return errorRes(400, "Cannot bind data", err)
|
||||
}
|
||||
@ -93,7 +94,6 @@ func sshKeysProcess(ctx echo.Context) error {
|
||||
func sshKeysDelete(ctx echo.Context) error {
|
||||
user := getUserLogged(ctx)
|
||||
keyId, err := strconv.Atoi(ctx.Param("id"))
|
||||
|
||||
if err != nil {
|
||||
return redirect(ctx, "/settings")
|
||||
}
|
||||
|
Reference in New Issue
Block a user