pages transaction
This commit is contained in:
parent
d5251b0967
commit
edc61712ef
|
@ -50,11 +50,11 @@ export const Product = observer(() => {
|
|||
const handleBuyProduct = async (data) => {
|
||||
try {
|
||||
const response = await store.transaction.buyProduct({productCode: data});
|
||||
if (response.status === 200) {
|
||||
// if (response.status === 200) {
|
||||
message.success("Success Buy Product");
|
||||
} else {
|
||||
message.error("Failed Buy Product");
|
||||
}
|
||||
// } else {
|
||||
//message.error("Failed Buy Product");
|
||||
//}
|
||||
} catch (e) {
|
||||
console.log(e, "apa errornya");
|
||||
message.error("Failed Buy Product");
|
||||
|
|
|
@ -34,7 +34,7 @@ export class Authentication {
|
|||
|
||||
try {
|
||||
const result = await http.post('/auth/login').send({username, password});
|
||||
|
||||
|
||||
TokenUtil.setAccessToken(result.body.access_token);
|
||||
TokenUtil.persistToken();
|
||||
runInAction(() => {
|
||||
|
|
Loading…
Reference in New Issue
Block a user