feat: Implement listing API tokens API endpoint
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
const getApiTokensMock = async (apiTokens) => {
|
||||
const data = apiTokens.map((apiToken) => {
|
||||
return {
|
||||
id: apiToken.id,
|
||||
token: apiToken.token,
|
||||
createdAt: apiToken.createdAt.getTime(),
|
||||
updatedAt: apiToken.updatedAt.getTime(),
|
||||
};
|
||||
});
|
||||
|
||||
return {
|
||||
data: data,
|
||||
meta: {
|
||||
count: data.length,
|
||||
currentPage: null,
|
||||
isArray: true,
|
||||
totalPages: null,
|
||||
type: 'ApiToken',
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
export default getApiTokensMock;
|
||||
Reference in New Issue
Block a user