mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-11-15 12:43:41 +08:00
feat: api can modify token's used and remains
- Updated base image in Dockerfile from `node:16` to `node:18` - Added `tokenPatch` struct to handle updates to the `Token` model - Updated `UpdateToken` function to use `tokenPatch` struct for binding JSON - Improved error handling and validation for token updates - Refined checks for token status, expiration, and quota - Enhanced error handling and response for token updates - Updated JSON response to include `data` field
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
FROM node:16 as builder
|
||||
FROM node:18 as builder
|
||||
|
||||
WORKDIR /build
|
||||
COPY web/package.json .
|
||||
@@ -7,7 +7,7 @@ COPY ./web .
|
||||
COPY ./VERSION .
|
||||
RUN DISABLE_ESLINT_PLUGIN='true' REACT_APP_VERSION=$(cat VERSION) npm run build
|
||||
|
||||
FROM golang AS builder2
|
||||
FROM golang:1.21.1 AS builder2
|
||||
|
||||
ENV GO111MODULE=on \
|
||||
CGO_ENABLED=1 \
|
||||
|
||||
Reference in New Issue
Block a user