This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.0; | |
import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; | |
import "@openzeppelin/contracts/access/Ownable.sol"; | |
contract AttendanceToken is ERC1155, Ownable { | |
mapping(uint256 => string) private _tokenURIs; | |
constructor() ERC1155("") {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ./src/middlewares/flatten-response.js | |
const strapiFlatten = (data) => { | |
const isObject = (data) => Object.prototype.toString.call(data) === '[object Object]'; | |
const isArray = (data) => Object.prototype.toString.call(data) === '[object Array]'; | |
const flatten = (data) => { | |
if (!data.attributes) return data; | |
return { |