mirror of
https://github.com/alexgo-io/redstone-cache-layer.git
synced 2026-01-12 08:34:36 +08:00
fix: package model fixed
This commit is contained in:
4
.github/workflows/deploy-lambda-to-ecr.yml
vendored
4
.github/workflows/deploy-lambda-to-ecr.yml
vendored
@@ -1,4 +1,4 @@
|
||||
name: Deploy to ECR
|
||||
name: Deploy lambda docker image to AWS ECR Public
|
||||
|
||||
on:
|
||||
push:
|
||||
@@ -19,7 +19,7 @@ jobs:
|
||||
with:
|
||||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||
aws-region: ap-south-1
|
||||
aws-region: eu-north-1
|
||||
|
||||
- name: Login to Amazon ECR
|
||||
id: login-ecr
|
||||
|
||||
@@ -1,16 +1,31 @@
|
||||
import mongoose from "mongoose";
|
||||
import { Price, PriceSchema } from "./price";
|
||||
import mongoose, { mongo } from "mongoose";
|
||||
const Schema = mongoose.Schema;
|
||||
|
||||
export interface IDataPoint {
|
||||
symbol: string;
|
||||
value: any;
|
||||
}
|
||||
|
||||
export interface Package {
|
||||
timestamp: number;
|
||||
signature?: string;
|
||||
liteSignature?: string;
|
||||
provider: string;
|
||||
signer: string;
|
||||
prices: Price[];
|
||||
prices: IDataPoint[];
|
||||
}
|
||||
|
||||
const DataPointSchema = new Schema<IDataPoint>({
|
||||
symbol: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
value: {
|
||||
type: Schema.Types.Mixed,
|
||||
required: true,
|
||||
},
|
||||
});
|
||||
|
||||
const PackageSchema = new Schema<Package>({
|
||||
timestamp: {
|
||||
type: Number,
|
||||
@@ -33,7 +48,7 @@ const PackageSchema = new Schema<Package>({
|
||||
required: false,
|
||||
},
|
||||
prices: {
|
||||
type: [PriceSchema],
|
||||
type: [DataPointSchema],
|
||||
required: true,
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user