mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-10-02 03:18:12 +08:00
expression count get and post action creators
This commit is contained in:
@@ -76,9 +76,54 @@ const initialize = () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const requestGeneExpressionCounts = () => {
|
||||||
|
return (dispatch, getState) => {
|
||||||
|
dispatch({type: "get expression started"})
|
||||||
|
fetch(`${globals.API.prefix}${globals.API.version}expression`, {
|
||||||
|
method: "get",
|
||||||
|
headers: new Headers({
|
||||||
|
'accept': 'application/json'
|
||||||
|
})
|
||||||
|
})
|
||||||
|
.then(res => res.json())
|
||||||
|
.then(
|
||||||
|
data => dispatch({type: "get expression success", data}),
|
||||||
|
error => dispatch({type: "get expression error", error})
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const ___hardcoded___requestGeneExpressionCountsPOST = () => {
|
||||||
|
return (dispatch, getState) => {
|
||||||
|
dispatch({type: "get expression started"})
|
||||||
|
fetch(`${globals.API.prefix}${globals.API.version}expression`, {
|
||||||
|
method: "POST",
|
||||||
|
body: JSON.stringify({
|
||||||
|
"genelist": [
|
||||||
|
"AAK1",
|
||||||
|
"1/2-SBSRNA4",
|
||||||
|
]
|
||||||
|
}),
|
||||||
|
headers: new Headers({
|
||||||
|
"accept": "application/json",
|
||||||
|
"Content-Type": "application/json"
|
||||||
|
})
|
||||||
|
})
|
||||||
|
.then(res => res.json())
|
||||||
|
.then(
|
||||||
|
data => dispatch({type: "get expression success", data}),
|
||||||
|
error => dispatch({type: "get expression error", error})
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
initialize,
|
initialize,
|
||||||
requestCells,
|
requestCells,
|
||||||
|
requestGeneExpressionCounts,
|
||||||
|
___hardcoded___requestGeneExpressionCountsPOST,
|
||||||
attemptCategoricalMetadataSelection,
|
attemptCategoricalMetadataSelection,
|
||||||
attemptCategoricalMetadataDeselection
|
attemptCategoricalMetadataDeselection
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user