Skip to content

Commit

Permalink
fix: quota bug
Browse files Browse the repository at this point in the history
  • Loading branch information
mlhiter committed Nov 15, 2024
1 parent 60ee91f commit 1a343a0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion frontend/providers/devbox/stores/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,15 @@ export const useUserStore = create<State>()(
checkQuotaAllow: ({ cpu, memory, nodeports }, usedData): string | undefined => {
const quote = get().userQuota

console.log(cpu, memory, nodeports)
const request = {
cpu: cpu / 1000,
memory: memory / 1024,
nodeports: nodeports
}

if (usedData) {
const { cpu, memory, nodeports } = usedData
const { cpu = 0, memory = 0, nodeports = 0 } = usedData

request.cpu -= cpu / 1000
request.memory -= memory / 1024
Expand Down

0 comments on commit 1a343a0

Please sign in to comment.