1
0
mirror of https://github.com/mgerb/classic-wow-forums synced 2026-01-11 09:32:51 +00:00

client - get browser fingerprint and set header

This commit is contained in:
2018-01-10 21:03:30 -06:00
parent 392e6de14c
commit 8eb31b984e
7 changed files with 71 additions and 18 deletions

View File

@@ -1,10 +1,13 @@
import { orderBy } from 'lodash';
import axios from '../axios/axios';
import { ThreadModel } from '../model';
const getCategoryThreads = async (category_id: string): Promise<ThreadModel[]> => {
try {
const res = await axios.get(`/api/thread?category_id=${category_id}`);
return res.data.data;
return orderBy(res.data.data as ThreadModel[], (thread: ThreadModel) => {
return -(new Date(thread.updated_at));
});
} catch (e) {
console.error(e);
}