package main

import (
	"github.com/gin-gonic/gin"
	"syno-common/server"
)

func main() {
	r := gin.Default()
	r.POST("/login", func(c *gin.Context) {
		user, err := server.Auth()
		if err != nil {
			c.JSON(500, gin.H{
				"code": 500,
				"msg":  err.Error(),
			})
			return
		}
		c.JSON(200, user)
	})

	r.Run(":9980")
}
