mirror of
https://github.com/ragestudio/relic.git
synced 2025-06-09 02:24:18 +00:00
remove merge
This commit is contained in:
parent
26753e6471
commit
f1fba82cdf
@ -2,7 +2,6 @@ import { JSONFilePreset } from "./libraries/lowdb/presets/node"
|
||||
import Vars from "./vars"
|
||||
import pkg from "../package.json"
|
||||
import fs from "node:fs"
|
||||
import lodash from "lodash"
|
||||
|
||||
export default class DB {
|
||||
static get defaultRoot() {
|
||||
@ -94,11 +93,15 @@ export default class DB {
|
||||
static async updatePackageById(pkg_id, obj) {
|
||||
let pkg = await this.getPackages(pkg_id)
|
||||
|
||||
|
||||
if (!pkg) {
|
||||
throw new Error("Package not found")
|
||||
}
|
||||
|
||||
return await this.writePackage(lodash.merge({ ...pkg }, obj))
|
||||
return await this.writePackage({
|
||||
...pkg,
|
||||
...obj,
|
||||
})
|
||||
}
|
||||
|
||||
static async deletePackage(pkg_id) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user