budibase/packages/server/middleware/routeHandlers/deleteRecord.js

10 lines
277 B
JavaScript
Raw Normal View History

const StatusCodes = require("../../utilities/statusCodes")
const { getRecordKey } = require("./helpers")
module.exports = async ctx => {
await ctx.instance.recordApi.delete(
getRecordKey(ctx.params.appname, ctx.request.path)
)
ctx.response.status = StatusCodes.OK
}