chore: add in typing

This commit is contained in:
Jonathan Summers-Muir committed 2021-12-08 22:25:09 -08:00
1 parent a862fa9913
commit bf5521f9d0
2 files changed
+3 -4

No files matched your search

+1 -2
View File
@@ -178,9 +178,8 @@ const Reports = () => {
setSaving(true)
const payload = {
content: config,
type: 'report'
}
await contentStore.update(id, payload)
await contentStore.update(id, payload, 'report')
await fetchReport()
setHasEdits(false)
setSaving(false)
+2 -2
View File
@@ -2,7 +2,7 @@ import { makeAutoObservable } from 'mobx'
import { keyBy } from 'lodash'
import { get, post, patch, delete_ } from 'lib/common/fetch'
import { UserContentMap } from 'types'
import { UserContent, UserContentMap } from 'types'
import { IRootStore } from '../RootStore'
import { API_URL } from 'lib/constants'
@@ -137,7 +137,7 @@ export default class ProjectContentStore implements IProjectContentStore {
}
}
async update(id: any, updates: any, type: string) {
async update(id: any, updates: any, type: UserContent['type']) {
try {
const headers = {
'Content-Type': 'application/json',