Implement immediate deployment, and automatically load scheduled tasks when the service starts.
This commit is contained in:
@@ -7,7 +7,7 @@ export const list = async (req: DeploymentListReq) => {
|
||||
page = req.page;
|
||||
}
|
||||
|
||||
let perPage = 10;
|
||||
let perPage = 50;
|
||||
if (req.perPage) {
|
||||
perPage = req.perPage;
|
||||
}
|
||||
@@ -19,7 +19,7 @@ export const list = async (req: DeploymentListReq) => {
|
||||
.collection("deployments")
|
||||
.getList<Deployment>(page, perPage, {
|
||||
filter: filter,
|
||||
sort: "-id",
|
||||
sort: "-deployedAt",
|
||||
expand: "domain",
|
||||
});
|
||||
};
|
||||
|
||||
@@ -17,9 +17,9 @@ export const get = async (id: string) => {
|
||||
|
||||
export const save = async (data: Domain) => {
|
||||
if (data.id) {
|
||||
return await getPb().collection("domains").update(data.id, data);
|
||||
return await getPb().collection("domains").update<Domain>(data.id, data);
|
||||
}
|
||||
return await getPb().collection("domains").create(data);
|
||||
return await getPb().collection("domains").create<Domain>(data);
|
||||
};
|
||||
|
||||
export const remove = async (id: string) => {
|
||||
|
||||
Reference in New Issue
Block a user