mirror of
https://github.com/notherealmarco/WASAPhoto.git
synced 2025-05-05 12:22:35 +02:00
Add database query status (and improved response), photos, likes, comments, bans
This commit is contained in:
parent
519ae22197
commit
abbd5bc494
22 changed files with 1118 additions and 72 deletions
|
@ -28,17 +28,18 @@ import (
|
|||
"database/sql"
|
||||
"errors"
|
||||
"fmt"
|
||||
"github.com/notherealmarco/WASAPhoto/service/api"
|
||||
"github.com/notherealmarco/WASAPhoto/service/database"
|
||||
"github.com/notherealmarco/WASAPhoto/service/globaltime"
|
||||
"github.com/ardanlabs/conf"
|
||||
_ "github.com/mattn/go-sqlite3"
|
||||
"github.com/sirupsen/logrus"
|
||||
"math/rand"
|
||||
"net/http"
|
||||
"os"
|
||||
"os/signal"
|
||||
"syscall"
|
||||
|
||||
"github.com/ardanlabs/conf"
|
||||
_ "github.com/mattn/go-sqlite3"
|
||||
"github.com/notherealmarco/WASAPhoto/service/api"
|
||||
"github.com/notherealmarco/WASAPhoto/service/database"
|
||||
"github.com/notherealmarco/WASAPhoto/service/globaltime"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
// main is the program entry point. The only purpose of this function is to call run() and set the exit code if there is
|
||||
|
@ -113,6 +114,7 @@ func run() error {
|
|||
apirouter, err := api.New(api.Config{
|
||||
Logger: logger,
|
||||
Database: db,
|
||||
DataPath: cfg.Data.Path,
|
||||
})
|
||||
if err != nil {
|
||||
logger.WithError(err).Error("error creating the API server instance")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue